Page 1 of 1
SRCHFOR to list members where 'search string' is not found.
Posted: Wed Aug 11, 2021 12:38 am
by CountryDelight
Hi,
Is there a way using batch SRCHFOR on a PDS to find only those members where the string was NOT found? I know how to create the JCL with SRHFOR to find the members where string was found but not other way round?
have anyone tried this and know it, please guide.
Re: SRCHFOR to list members where 'search string' is not found.
Posted: Wed Aug 11, 2021 8:14 pm
by knome
I think you cannot do this. You can only search for the string you supply in the search argument.
Re: SRCHFOR to list members where 'search string' is not found.
Posted: Wed Aug 11, 2021 11:10 pm
by giskard reventlov
I think you cannot do this. You can only search for the string you supply in the search argument.
the ibm manual disagree
something like
Code: Select all
****** ***************************** Top of Data ******************************
000003 //ISR EXEC PGM=ISRSUPC,
000004 // PARM=(SRCHCMP,'LNFMTO')
000005 //NEWDD DD DISP=SHR,DSN=<YOUR PDS>
000006 //OUTDD DD SYSOUT=(*)
000007 //SYSIN DD *
000008 SRCHFOR '<YOUR SEARCH STRING>'
000009 /*
****** **************************** Bottom of Data ****************************
should provide what the ts asked for
Re: SRCHFOR to list members where 'search string' is not found.
Posted: Tue Aug 24, 2021 7:18 pm
by CountryDelight
Thank you giskard, LNFMTO did work great.