View previous topic :: View next topic
Author
Message
kirankumarj New User Joined: 18 Dec 2007Posts: 51 Location: delaware
I have a INPUT FILE of FB, 200 bytes LRECL.
Data would be :
Code:
EDIT CCSDLTQX.TRANS.FBDP3550.G0001V00 Colum
Command ===> Sc
=COLS> ----+----1----+----2----+----3----+----4----+----5----+--
****** ***************************** Top of Data ***************
000001 20944510035799135300000014264031608000000
000002 20944510035799135400000048704031808000000
000003 20944510035799135500000058738031808000000
000004 20944510035799135600000015973031808000000
000005 20944510035799135700000003616031808000000
000006 20944510035799135800000015092031808000000
000007 20944510035799135900000111293031808000000
.
.
.
.
Amount is in position 19 for a length of 11 .
In the output file, (200 bytes LRECL), I should add a Trailer Record with the count in position 10 for 11 and Total Amount in position 25 for 11.
Could you please guide me with Control card. We are using DFSORT in our shop
Back to top
Skolusu Senior Member Joined: 07 Dec 2007Posts: 2205 Location: San Jose
Try the following control cards
Code:
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL REMOVECC,
TRAILER1=(10:COUNT=(M11,LENGTH=11),25:TOT=(19,11,ZD,M11,LENGTH=11))
//*
Back to top
kirankumarj New User Joined: 18 Dec 2007Posts: 51 Location: delaware
I could get what i wanted from this control card. Thanks a bunch.
If you dont mind , one more follow up on this. The input file has data only till 41 columns. So, the jcl is forcing me to have the output file also as 41.
Cant i have it as 200 ?
Back to top
kirankumarj New User Joined: 18 Dec 2007Posts: 51 Location: delaware
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 SORT FIELDS=COPY
000002 OMIT COND=(1,1,CH,EQ,C'0',OR,1,1,CH,EQ,C'6')
000003 OUTFIL REMOVECC,
000004 TRAILER1=(1:'T',10:COUNT=(M11,LENGTH=11),
000005 25:TOT=(09,11,ZD,M11,LENGTH=10))
000006 OUTREC FIELDS=(1:C'38774212',09:19,11,20:C'0',21:10,09,30:30,06,
000007 36:02,6)
****** **************************** Bottom of Data ****************************
Back to top
Skolusu Senior Member Joined: 07 Dec 2007Posts: 2205 Location: San Jose
try the following control cards to have the output file as 200 bytes
Code:
//SYSIN DD *
OMIT COND=(1,1,SS,EQ,C'0,6')
SORT FIELDS=COPY
OUTREC BUILD=(01:C'38774212',
09:19,11,
20:C'0',
21:10,09,
30:30,06,
36:02,6,
200:X)
OUTFIL REMOVECC,
TRAILER1=(01:'T',10:COUNT=(M11,LENGTH=11),
25:TOT=(09,11,ZD,M11,LENGTH=10))
/*
Back to top
kirankumarj New User Joined: 18 Dec 2007Posts: 51 Location: delaware
It worked like a charm. Thanks for your time and effort.
Back to top
Please enable JavaScript!