I think he wants 100 keys (purchase order numbers), then all records for those numbers. Easiest would be to select just the purchase order number, eliminated fields, save the result into a file to pick the POs. Then use this file to match to filter the input to the matching keys (purchase order numbers).
On Wed, May 22, 2019 at 1:10 AM Ron Hawkins <ron.hawk...@ipsicsopt.com> wrote: > > Ron, > > I'm having a big dose of dumbness today. > > Using your sample data, are you saying you need to generate 100 copies of > each record, 100 copies of each unique record, or 100 copies of the first > record of each key? > > 102016 | 31859949 | | 1613QTTR | 1 > 102016 | 31859949 | | 1613QTTR | 1 > 102016 | 31859949 | | 1613QTTR | 1 > 102016 | 31859949 | | 1613QTTR | 1 > 102016 | 31859949 | | 1613QTTR | 1 > 102016 | 31859949 | | 1613QTTR | 1 > 102016 | 31859949 | | 1613QTTR | 1 > 102016 | 31859949 | | 1613QTTR | 2 <== changed > for the example > 104152 | 32412273 | | 2373QTBO | 1 > 104152 | 32412273 | | 2373QTBO | 1 > 104152 | 32412273 | | 2373QTBO | 1 > 104152 | 32412273 | | 2373QTBO | 1 > 104152 | 32412273 | | 2373QTBO | 1 > > If 100 copies then these thirteen records would generate 1300 records. > If 100 copies of each unique record then there would be 300 records generated > If 100 copies of each unique key then there would be 200 records generated > > I'd have to RTFM to figure out the INPUT you provided, so I am relying on the > description. > > > RON HAWKINS > Director, Ipsicsopt Pty Ltd (ACN: 627 705 971) > m+61 400029610| t: +1 4085625415 | f: +1 4087912585 > > -----Original Message----- > From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of > Ron Thomas > Sent: Wednesday, 22 May 2019 12:20 > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: [IBM-MAIN] Sort - File split > > Ron, I don't need a single record per P.O, what i need is pull 100 P.O in the > output file . A P.O will contain multiple records for e.g if each PO has 5 > rows then the ouput will be 500. I put something like the below but this is > not working > > SORT FIELDS=COPY > INREC IFTHEN=(WHEN=INIT,OVERLAY=(6003:SEQNUM,3,ZD,RESTART=(01,12))) > OUTFIL FNAMES=OUT01,INCLUDE=(6003,3,ZD,LT,101),BUILD=(1,6000) > OUTFIL FNAMES=LEFTOVER,INCLUDE=(6003,3,ZD,GT,101),BUILD=(1,6000) > > Thanks > Ron T > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, send email to > lists...@listserv.ua.edu with the message: INFO IBM-MAIN > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- Mike A Schwab, Springfield IL USA Where do Forest Rangers go to get away from it all? ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN