Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Well, you didn't give the starting position or length of the PD count field you want in the ZZ record, so I'll assume it starts in position 3 and has a length of 8 bytes. Here's a DFSORT job that will do what you asked for with those assumptions. Change as needed.
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
AA2007-07-12ABCDE D
DDDDD 00000000000000111111111MBRBRAHMAN ABC - AXEA VOERL
DDDDD 00000000000000232131231MALLIKAJUN RED - ABYC EREAD
DDDDD 000000000000001212161212MIREREEAIA AEA TESTING
DDDDD 00000000000000121210911LMI REDDO EVW TESTING
ZZ
//SORTOUT DD ... output file
//SYSIN DD *
OMIT COND=(1,2,CH,EQ,C'ZZ')
SORT FIELDS=(1,2,AC,A)
SUM FIELDS=NONE
OUTFIL REMOVECC,
TRAILER1=('ZZ',COUNT-1=(TO=PD,LENGTH=8))
/*
|
|
|