HI Kolusu, Many thanks for your help. If there is not a OHSM record for each DSNAME, I will have a bigger problem to solve. Best wishes, Jack
On Thu, 24 Nov 2022 at 15:30, Sri h Kolusu <[email protected]> wrote: > >>. So, what I need is to get the dataset name from the record that has > "DSNAME =", the volser from the record that has "ODSN:" and format a single > record with volser datasetname or datasetname volser > > Jack > > Use the following untested control cards which will give you the desired > results assuming that DSNAME = record always have a OHSM record as a pair. > > //SYSIN DD * > OPTION COPY > INCLUDE COND=(02,08,CH,EQ,C'DSNAME =',OR, > 02,05,CH,EQ,C'OHSM.') > > INREC IFTHEN=(WHEN=GROUP, > BEGIN=(02,08,CH,EQ,C'DSNAME ='), > END=(02,05,CH,EQ,C'OHSM.'), > PUSH=(81:11,44)) > > OUTFIL INCLUDE=(02,05,CH,EQ,C'OHSM.'), > BUILD=(81,44, # DSNAME > 2X, # 2 SPACES > 47,06) # VOLSER > /* > > > 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 > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
