Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 8593
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: 6966
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 Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts Random Password (in string format) ge... ezhavendhan COBOL Programming 10 Mon Aug 29, 2016 3:18 pm
No new posts How to insert a lengthy string havin... vidyaa DB2 7 Thu Aug 25, 2016 5:20 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us