>> Kolusu, this works great, and the end user is happy with the detail. Now,
>> he wants one additional tweak. The top of the file (within the first two
>> rows) has this:
Billy,
If your intention is to pick the 2nd or 3rd record, all you need to do is add
the sequence number to the records and then use that in WHEN=GROUP to push it
all records. The numeric validation and D record validation can also be done
on OUTFIL.
Use the control cards.(This uses the info from the 2nd record)
//SYSIN DD *
INREC IFTHEN=(WHEN=INIT,
OVERLAY=(134:SEQNUM,8,ZD)),
IFTHEN=(WHEN=GROUP,BEGIN=(134,8,ZD,EQ,2),
PUSH=(143:02,44))
SORT FIELDS=(01,03,CH,A)
OUTFIL REMOVECC,NODETAIL,
INCLUDE=(19,03,FS,EQ,NUM,AND,
22,01,CH,EQ,C'D'),
HEADER1=(143,044),
SECTIONS=(01,03,
TRAILER3=(' DEPARTMENT ',
01,03,
COUNT=(M10,LENGTH=8),
' ARTICLES, TOTAL ITEMS: ',
TOT=(102,09,UFF,M10,LENGTH=12))),
TRAILER1=('*** TOTAL *** : ',
COUNT=(M10,LENGTH=8),
' ARTICLES, TOTAL ITEMS: ',
TOT=(102,09,UFF,M10,LENGTH=12))
/*
Thanks,
Kolusu
DFSORT Development
IBM Corporation
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN