View previous topic :: View next topic
|
Author |
Message |
hariibm
New User
Joined: 05 Feb 2007 Posts: 61 Location: Chennai
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Option 3.14, then you need to do some work on your search arguments. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
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 |
|
|
Uday Kumar R
New User
Joined: 07 Nov 2007 Posts: 27 Location: Mumbai
|
|
|
|
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 |
|
|
Dsingh29
Active User
Joined: 16 Dec 2008 Posts: 132 Location: IBM
|
|
|
|
Simply write
srchfor 'your string'
at the command line once you are in the PDS. |
|
Back to top |
|
|
|