View previous topic :: View next topic
|
Author |
Message |
Prosenjit001
New User
Joined: 02 Nov 2011 Posts: 14 Location: India
|
|
|
|
need a rexx to find the list of source pgm using a particular copybook . the PDS having source pgms is huge . hence while using find command using isredit macro on each member , taking lot of time .
Could anyone can help on this . I was thinking of trap the output of srchfor , but not sure how to use it i rexx .
Any sort of example would be helpful . |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
just meditate ...
srchfor and superc write the results to
<user>.SRCHDSL.LIST
<user>.SUPERC.LIST
invoke srchfor/superc and after that process the relative dataset |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
but...
ISPF already provides a tool for that
it is called MEMBER PARTS LIST
( foreground/batch option 12 )
it provides a cross reference both for copybooks and statically called subroutines
in two formats,
formatted ( to be browsed)
<raw> to be processed by a user <program>
no need to reinvent the wheel
also as an alternative use Your source control system ...
all of them usually provide cross referencing facilities |
|
Back to top |
|
|
Prosenjit001
New User
Joined: 02 Nov 2011 Posts: 14 Location: India
|
|
|
|
could you please give the syntax to invoke srchfor .. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
What have you tried yourself, and what results did you get ? |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Use the following commands:
"ALLOC" to allocate all necessary input and output files.
"EXECIO" to write your search-for process statements.
"CALL" to run super-search.
"EXECIO" to read the search-for results.
"FREE" to release the allocated files.
Now, you must do some work before you can get more information from me |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
look at ISP.SISPCLIB(ISRSSRCH)
to see how ISPF itself does it and convert the relevant statements to rexx
simple to understand, implement, bulletproof
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
It is not clear from the examples given, but when you invoke the ISRSUPC program, the SYSIN file needs to have something like this:
which will specify what text to search for.
My suggestion is to use ISPF option 3.14 and specify "execution mode' as 'batch'. It will build a batch job for you. Your task is to implement the equivalent of the batch job but in a rexx program. As Marso pointed out, use ALLOC and EXECIO to build the inputs for the searchfor program. |
|
Back to top |
|
|
jerryte
Active User
Joined: 29 Oct 2010 Posts: 202 Location: Toronto, ON, Canada
|
|
|
|
Prosenjit001 wrote: |
need a rexx to find the list of source pgm using a particular copybook . the PDS having source pgms is huge . hence while using find command using isredit macro on each member , taking lot of time .
|
If all you want is a list of members then you don't need a Rexx. Use the ISPF Super Search facility. From the primary menu select option 3 (Utilities) and then select the option for "Search-ForE" for the Extended Search-for Utility.
Type 'P' on the command line to bring up a menu of process options. I suggest to use options DPCBCMT IDPFX NOPRTCC so that it ignores COBOL comments and formats the output nicely.
On the bottom of the screen set "Execution mode" to 2.Batch. It will generate JCL for the search. It will then give the option to send the results to a dataset or to held output. |
|
Back to top |
|
|
|