Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Searching a PDS with a generic string..

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
hariibm

New User


Joined: 05 Feb 2007
Posts: 61
Location: Chennai

PostPosted: Tue Nov 03, 2009 12:30 pm    Post subject: Searching a PDS with a generic string..
Reply with quote

Hi,

Please let me know if there is anyway to find out the below statement from the list of programs in a PDS.

MOVE '123' TO FIELD-A.

I have to find this statement in all the programs. It is a simple thing. But the problem is the string varies in different programs. It may be '123' or '312' or '456' or '999' etc..

Please note this string contains only digits. Please let me know how to find the list of programs which are using this statement irrespective of the string.

Please note:
Searching for FIELD-A will give some other unwanted programs list which is not required. My search must find the above statement entirely.(with an exception of the change in string).

Please let me know in case of any questions.

Regards,
Hari.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8614
Location: Back in jolly old England

PostPosted: Tue Nov 03, 2009 12:33 pm    Post subject:
Reply with quote

Option 3.14, then you need to do some work on your search arguments.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6970
Location: porcelain throne

PostPosted: Tue Nov 03, 2009 2:34 pm    Post subject:
Reply with quote

Quote:
My search must find the above statement entirely.(with an exception of the change in string).


sounds like a school assignment.
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 401
Location: Mumbai

PostPosted: Tue Nov 03, 2009 10:41 pm    Post subject:
Reply with quote

this is a very common thing to do with regular expressions in Unix, but unfortunately, ISPF tools don't usually implement regular expressions.

You have a couple of options. Write a small edit macro that will do the search for you and run that against all members. A macro that does something like

C P'#' @ all
f "MOVE '@@@' TO FIELD-A." all
if rc=0 ... process
'CANCEL' /* important! */

You can also copy the members to the Unix for z/OS file system and use real regular expressions there.

as expat said, Superc might be able to do that if you use a similar trick of changing all numbers to a special character before the search. SORT can probably do the same trick also.
Back to top
View user's profile Send private message
Uday Kumar R

New User


Joined: 07 Nov 2007
Posts: 25
Location: Mumbai

PostPosted: Thu Nov 12, 2009 4:56 pm    Post subject: Reply to: Searching a PDS with a generic string..
Reply with quote

Hi,

This can be done through FILE-AID by using simple job.
//JOBCARD
//STEP010 EXEC PGM=FILEAID,PARM='TSO'
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DSN=AAAAA.BBBBBB.CCCCC,DISP=SHR
// DD DSN=xxxxx.yyyyy.zzzzzz,DISP=SHR
//SYSIN DD *
$$DD01 LIST MEMBERS=ALL,
IF=(1,0,C'TO FIELD-A'),OUT=0
/*

AAAAA.BBBBBB.CCCCC -- This PDS represent the list of programs where they located. If there are more than one PDS for search, then one write it one by one. The output would be shown in SYSLIST at the spool.

Bye
Back to top
View user's profile Send private message
Dsingh29

Active User


Joined: 16 Dec 2008
Posts: 132
Location: IBM

PostPosted: Thu Nov 12, 2009 5:09 pm    Post subject:
Reply with quote

Simply write

srchfor 'your string'

at the command line once you are in the PDS.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts Search for a string in many PDS KARTHIGADEVI CLIST & REXX 5 Fri Sep 08, 2017 2:32 pm
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm
No new posts String after '.' (period) is not copy... balaji81_k SYNCSORT 6 Wed Aug 23, 2017 9:35 pm
No new posts change string before sertan string anatol DFSORT/ICETOOL 8 Tue Aug 15, 2017 5:43 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us