SRCHFOR to list members where 'search string' is not found.

Time Sharing Option, Interactive System Productivity Facility and REstructured eXtended eXecutor

Moderator: mickeydusaor

Post Reply
User avatar
CountryDelight
Registered Member
Posts: 12
Joined: Sun Aug 08, 2021 4:19 pm

SRCHFOR to list members where 'search string' is not found.

Post 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.
knome
New Member
Posts: 2
Joined: Fri Oct 17, 2014 10:23 am

Re: SRCHFOR to list members where 'search string' is not found.

Post by knome »

I think you cannot do this. You can only search for the string you supply in the search argument.
User avatar
giskard reventlov
Registered Member
Posts: 11
Joined: Wed Jul 29, 2020 4:42 pm

Re: SRCHFOR to list members where 'search string' is not found.

Post 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 8-)

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
User avatar
CountryDelight
Registered Member
Posts: 12
Joined: Sun Aug 08, 2021 4:19 pm

Re: SRCHFOR to list members where 'search string' is not found.

Post by CountryDelight »

Thank you giskard, LNFMTO did work great.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “TSO, ISPF & REXX (Do you still do CLIST?!).”