IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Searching a PDS with a generic string..


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Tue Nov 03, 2009 12:33 pm
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
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: 400
Location: Mumbai

PostPosted: Tue Nov 03, 2009 10:41 pm
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: 27
Location: Mumbai

PostPosted: Thu Nov 12, 2009 4:56 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts file manager is doing string conversion IBM Tools 3
No new posts Search string in job at regular Spool... CLIST & REXX 0
Search our Forums:

Back to Top