Re: DFSORT: Get part of a file between to records
Hi Mike, I did not know about that. I will look into it. Thank you for the info. Regards, Jack On Mon, 10 Oct 2022 at 18:35, Mike Schwab wrote: > IEBGENER RECORD statement? > https://www.ibm.com/docs/en/zos/2.1.0?topic=statements-record-statement > > On Mon, Oct 10, 2022 at 10:17 AM Jack Zukt wrote: > > > > Hi, > > I am trying to use DFSORT to get part of a dataset. > > We are directing the output of an ABAR job to a dataset and I would like > to > > get the log for a specified date. Every LOG begins and ends with specific > > strings, and I would like to get those records and all the records in the > > middle, ignoring all the other ones. > > So, the first group record would have a string like > > (26,10,CH,EQ,C'2022/10/08') > > and the last record group would have a string like > > (01,10,CH,EQ,C'A TOTAL OF'). > > I need to get those two records, all the records in between those and > > ignore all the other ones. > > I am trying to use > > OUTFIL FNAMES=OUT#F1, > >IFTHEN=(WHEN=GROUP, > >BEGIN=(26,10,CH,EQ,C'2022/10/08'), > >IFTHEN=(WHEN=ANY, > > PUSH=(1:1,121), > >END=(01,10,CH,EQ,C'A TOTAL OF'), > > But this is copying all the records to the output file. > > I am still going through the manual but I would appreciate any help > because > > I do feel like I am looking at the wrong place. > > TIA > > Jack > > > > -- > > 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 > -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: DFSORT: Get part of a file between to records
Thanks Kolusu, It worked just as needed Best regards Jack On Tue, 11 Oct 2022 at 05:25, Sri h Kolusu wrote: > >> I am trying to use DFSORT to get part of a dataset. > > Jack, > > Please use the following untested JCL which will give you the desired > results > > //STEP0100 EXEC PGM=SORT > //SYSOUT DD SYSOUT=* > //SORTIN DD DISP=SHR,DSN=Your.input.FB.121.byte file > //SORTOUT DD SYSOUT=* > //SYSINDD * > OPTION COPY > INREC IFTHEN=(WHEN=GROUP, >BEGIN=(26,10,CH,EQ,C'2022/10/08'), > END=(01,10,CH,EQ,C'A TOTAL OF'), > PUSH=(122:ID=8)) > > OUTFIL BUILD=(001,121), > INCLUDE=(122,8,CH,GT,C' ') > /* > > Thanks, > Kolusu > > > -- > 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
Re: DFSORT: Get part of a file between to records
>> I am trying to use DFSORT to get part of a dataset. Jack, Please use the following untested JCL which will give you the desired results //STEP0100 EXEC PGM=SORT //SYSOUT DD SYSOUT=* //SORTIN DD DISP=SHR,DSN=Your.input.FB.121.byte file //SORTOUT DD SYSOUT=* //SYSINDD * OPTION COPY INREC IFTHEN=(WHEN=GROUP, BEGIN=(26,10,CH,EQ,C'2022/10/08'), END=(01,10,CH,EQ,C'A TOTAL OF'), PUSH=(122:ID=8)) OUTFIL BUILD=(001,121), INCLUDE=(122,8,CH,GT,C' ') /* Thanks, Kolusu -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: DFSORT: Get part of a file between to records
IEBGENER RECORD statement? https://www.ibm.com/docs/en/zos/2.1.0?topic=statements-record-statement On Mon, Oct 10, 2022 at 10:17 AM Jack Zukt wrote: > > Hi, > I am trying to use DFSORT to get part of a dataset. > We are directing the output of an ABAR job to a dataset and I would like to > get the log for a specified date. Every LOG begins and ends with specific > strings, and I would like to get those records and all the records in the > middle, ignoring all the other ones. > So, the first group record would have a string like > (26,10,CH,EQ,C'2022/10/08') > and the last record group would have a string like > (01,10,CH,EQ,C'A TOTAL OF'). > I need to get those two records, all the records in between those and > ignore all the other ones. > I am trying to use > OUTFIL FNAMES=OUT#F1, >IFTHEN=(WHEN=GROUP, >BEGIN=(26,10,CH,EQ,C'2022/10/08'), >IFTHEN=(WHEN=ANY, > PUSH=(1:1,121), >END=(01,10,CH,EQ,C'A TOTAL OF'), > But this is copying all the records to the output file. > I am still going through the manual but I would appreciate any help because > I do feel like I am looking at the wrong place. > TIA > Jack > > -- > 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
DFSORT: Get part of a file between to records
Hi, I am trying to use DFSORT to get part of a dataset. We are directing the output of an ABAR job to a dataset and I would like to get the log for a specified date. Every LOG begins and ends with specific strings, and I would like to get those records and all the records in the middle, ignoring all the other ones. So, the first group record would have a string like (26,10,CH,EQ,C'2022/10/08') and the last record group would have a string like (01,10,CH,EQ,C'A TOTAL OF'). I need to get those two records, all the records in between those and ignore all the other ones. I am trying to use OUTFIL FNAMES=OUT#F1, IFTHEN=(WHEN=GROUP, BEGIN=(26,10,CH,EQ,C'2022/10/08'), IFTHEN=(WHEN=ANY, PUSH=(1:1,121), END=(01,10,CH,EQ,C'A TOTAL OF'), But this is copying all the records to the output file. I am still going through the manual but I would appreciate any help because I do feel like I am looking at the wrong place. TIA Jack -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN