View previous topic :: View next topic
|
Author |
Message |
venugopala
New User
Joined: 19 Oct 2006 Posts: 4
|
|
|
|
Hi,
Could you please give direction to solve below stated problem?
Input file (FB/LRECL=500) with 200 records, expected output file is (FB/LRECL=500) with header “headerxxxxxxx” and trailer as number of records i.e 202
Ex:
Input
aaaaaaaaaaaaa….
bbbbbbbbbbbb….
ccccccccccccc….
dddddddddddd…
Output
headerxxxxxxxxxxxx
aaaaaaaaaaaaa……
bbbbbbbbbbbb…..
ccccccccccccc……
dddddddddddd……
Trailer:00006
Thanks in advance
Regards,
Venu. |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
venugopala,
The following DFSORT JCL will give you the desired results
Code: |
//STEP0100 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=your 500 byte input file,disp=shr
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL REMOVECC,
HEADER1=('HEADERXXXXXXX'),
TRAILER1=('TRAILER:',COUNT+2=(M11,LENGTH=8))
//* |
|
|
Back to top |
|
|
venugopala
New User
Joined: 19 Oct 2006 Posts: 4
|
|
|
|
Sorry for late reply
Thanks a lot Skolusu
It’s working fine |
|
Back to top |
|
|
|