Jason, I'm not sure I fully understood your question and I'm not really sure it works generally because I'm assuming that OPERLOG interleaves blanks on "WTO TIME" position when a multiline WTO happens and that a multiline WTO cannot be interrupted (not sure + not sure means not good :D).
Try this: //*-------------------------------------------------------------------* //* * //*-------------------------------------------------------------------* //ST010 EXEC PGM=SORT //SYSOUT DD SYSOUT=* //SORTIN DD DISP=SHR,DSN=MYLOG //SORTOUT DD DSN=&ALL,DISP=(,PASS), // SPACE=(TRK,(300,300)) //ERROR DD DSN=&ERR,DISP=(,PASS), // SPACE=(TRK,(300,300)) //SYSIN DD * OPTION VLSCMP INREC IFTHEN=(WHEN=GROUP,BEGIN=(28,1,CH,NE,C' '), PUSH=(140:ID=9)) SORT FIELDS=COPY OUTFIL FNAMES=SORTOUT OUTFIL FNAMES=ERROR,INCLUDE=(1,137,SS,EQ,C'ERROR') /* //*-------------------------------------------------------------------* //* * //*-------------------------------------------------------------------* //ST020 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DELETE MYLOG.OK IF MAXCC=8 THEN SET MAXCC=0 /* //*-------------------------------------------------------------------* //* * //*-------------------------------------------------------------------* //ST004 EXEC PGM=SORT //SYSOUT DD SYSOUT=* //ERROR DD DSN=&ERR,DISP=(OLD,DELETE) //ALL DD DSN=&ALL,DISP=(OLD,DELETE) //SORTOUT DD DSN=MYLOG.OK, // DISP=(,CATLG),DATACLAS=UEFSQCMP, // SPACE=(TRK,(300,300)) //SYSIN DD * JOINKEYS F1=ERROR,FIELDS=(140,9,A),SORTED JOINKEYS F2=ALL,FIELDS=(140,9,A),SORTED REFORMAT FIELDS=(F2:1,137) SORT FIELDS=COPY /* Best regards. Max Il giorno ven 17 dic 2021 alle ore 08:19 ibmmain <[email protected]> ha scritto: > Hi all > > > For performance, we want to filter keywords (for > example:'ERROR') from oplerlog with DFSORT. > > > If the keyword is is a fixed position in operlog , we could > put the keyword in the other dataset. > > > We could join the oplerlog with the dataset using DFSORT to > filter all messages that contained ' ERROR' > > > But the keywords aren't fixed position in OPERLOG, how to filter > this keyword with DFSORT. > > > Of course, we could do it by REXX > > > Any suggestions would be greatly appreciated! > > > > > Thanks a lot! > > > Best Regards, > > > Jason Cai > > > > > ---------------------------------------------------------------------- > 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
