Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Can Icetool generate control total file ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
NCROLL

New User


Joined: 19 May 2008
Posts: 5
Location: UK

PostPosted: Thu Oct 09, 2008 4:42 pm    Post subject: Can Icetool generate control total file ?
Reply with quote

Using an input set of data I need to create a single record control total file. I cannot figure out how to do the whole of this in one step. Perhaps it is not possible and as such I should just write a cobol program ?

Please see the example that is attached.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Oct 09, 2008 4:46 pm    Post subject:
Reply with quote

Please do not post attachments as many people are restricted from opening these, thus reducing the number of people available to help you.

Post the data as text, and Click HERE to see how to use tags to make your post more easily readable
Back to top
View user's profile Send private message
NCROLL

New User


Joined: 19 May 2008
Posts: 5
Location: UK

PostPosted: Thu Oct 09, 2008 5:03 pm    Post subject: This is the example that was in the attachment
Reply with quote

Code:

DATA IN                                                       
< MISC DATA              >< AMOUNT FIELD     >               
2550GBP   0000    000.000N                .00                 
5278GBP   0000    000.000N           -6312.19                 
0019GBP   0000    000.000N              -7.16                 
1101GBP   0636    006.360N            6064.71                 
1101GBP   0662    006.620N          -32609.99                 
1101GBP   0710    007.100N             217.79                 
1101GBP   2102    021.020N             290.32                 
1101GBP   2112    021.120N            3791.76                 
**************************************************************
AUDIT RECORD TO BE GENERATED                                 
<FLD 1       ><FLD 2><FLD 3        ><FLD 4        ><FLD 5>   
091020081124010000008+00000010364.58-00000038939.34N         
FLD 1 = DATE AND TIME JOB RAN AT                             
FLD 2 = RECORD COUNT                                         
FLD 3 = TOTAL CREDITS FROM AMOUNT FIELD                       
FLD 4 = TOTAL DEBITS  FROM AMOUNT FIELD                       
FLD 5 = EMTPY FLAG - IE. IF RECORD CNT = 0000 THEN SHOULD BE Y
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Oct 09, 2008 10:05 pm    Post subject:
Reply with quote

NCROLL,

The following DFSORT JCL will give you the desired results


Code:

//STEP0100 EXEC PGM=ICEMAN                                   
//SYSOUT   DD SYSOUT=*                                       
//SORTIN   DD *                                               
2550GBP   0000    000.000N                .00                 
5278GBP   0000    000.000N           -6312.19                 
0019GBP   0000    000.000N              -7.16                 
1101GBP   0636    006.360N            6064.71                 
1101GBP   0662    006.620N          -32609.99                 
1101GBP   0710    007.100N             217.79                 
1101GBP   2102    021.020N             290.32                 
1101GBP   2112    021.120N            3791.76                 
//SORTOUT  DD DSN=&&T1,DISP=(,PASS),SPACE=(TRK,(1,0),RLSE)   
//SYSIN    DD *                                               
  SORT FIELDS=COPY                                           
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:19C'0')),               
  IFTHEN=(WHEN=(27,19,SFF,LT,0),OVERLAY=(81:27,19,27:19C'0'))
  OUTFIL REMOVECC,NODETAIL,BUILD=(52X),                       
  TRAILER1=(DATENS=(DM4),TIMENS=(24),                         
            COUNT=(M11,LENGTH=7),                             
            TOT=(27,19,SFF,EDIT=(+TTTTTTTTTTT.TT)),           
            TOT=(81,19,SFF,EDIT=(-TTTTTTTTTTT.TT)),'N')       
/*                                                           
//STEP0200 EXEC PGM=ICEMAN                                   
//SYSOUT   DD SYSOUT=*                                       
//SORTIN   DD DSN=&&T1,DISP=SHR                               
//SORTOUT  DD SYSOUT=*                                       
  SORT FIELDS=COPY                                           
  INREC IFTHEN=(WHEN=(15,7,ZD,EQ,0),OVERLAY=(52:C'Y'))       
/*                                                           
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Oct 09, 2008 10:17 pm    Post subject:
Reply with quote

NCROLL,

<Oops - Kolusu beat me to it. Well, you asked for one step and this version does it in one step, so I'll leave it here.>

Here's a DFSORT/ICETOOL job that will do what you asked for.

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//IN DD DSN=...  input file (FB/46)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//OUT DD DSN=...  output file (FB/58)
//TOOLIN   DD    *
COPY FROM(IN) USING(CTL1)
COPY FROM(T1) TO(OUT) USING(CTL2)
/*
//CTL1CNTL DD *
  INREC IFOUTLEN=52,
        IFTHEN=(WHEN=(27,19,SFF,GE,0),
           BUILD=(1:27,19,UFF,TO=ZD,LENGTH=19)),
        IFTHEN=(WHEN=NONE,
           BUILD=(20:27,19,SFF,TO=ZD,LENGTH=19))
  OUTFIL FNAMES=T1,REMOVECC,NODETAIL,
    TRAILER1=(DATENS=(MD4),TIMENS=(24),COUNT=(M11,LENGTH=7),
       TOTAL=(1,19,ZD,EDIT=(+TTTTTTTTTTT.TT)),
       TOTAL=(20,19,ZD,EDIT=(-TTTTTTTTTTT.TT)),C'N')
/*
//CTL2CNTL DD *
  INREC IFOUTLEN=58,
    IFTHEN=(WHEN=(15,7,ZD,EQ,0),OVERLAY=(52:C'Y'))
/*
Back to top
View user's profile Send private message
NCROLL

New User


Joined: 19 May 2008
Posts: 5
Location: UK

PostPosted: Fri Oct 10, 2008 7:29 pm    Post subject: Reply to: Can Icetool generate control total file ?
Reply with quote

Skolusu and Frank Yaeger,

thank you both for your replies. The code you have both kindly provided is exactly what I was looking for though it was not clear to me how to achieve this.

Having seen the statements I'm now going through the code to understand exactly what each means.

This is thankfully going to save a lot of effort writing some noddy cobol programs.

Thanks again.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us