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
 

 

Srchfor in REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Prosenjit001

New User


Joined: 02 Nov 2011
Posts: 14
Location: India

PostPosted: Thu Jan 05, 2012 3:23 pm    Post subject: Srchfor in REXX
Reply with quote

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
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Jan 05, 2012 3:33 pm    Post subject: Reply to: Srchfor in REXX
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Jan 05, 2012 3:41 pm    Post subject: Reply to: Srchfor in REXX
Reply with quote

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
View user's profile Send private message
Prosenjit001

New User


Joined: 02 Nov 2011
Posts: 14
Location: India

PostPosted: Thu Jan 05, 2012 4:19 pm    Post subject:
Reply with quote

could you please give the syntax to invoke srchfor ..
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: Thu Jan 05, 2012 4:44 pm    Post subject:
Reply with quote

What have you tried yourself, and what results did you get ?
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1219
Location: Israel

PostPosted: Thu Jan 05, 2012 8:00 pm    Post subject:
Reply with quote

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 icon_smile.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Jan 05, 2012 8:24 pm    Post subject: Reply to: Srchfor in REXX
Reply with quote

look at ISP.SISPCLIB(ISRSSRCH)
to see how ISPF itself does it and convert the relevant statements to rexx
simple to understand, implement, bulletproof
icon_cool.gif
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Thu Jan 05, 2012 10:42 pm    Post subject: Reply to: Srchfor in REXX
Reply with quote

It is not clear from the examples given, but when you invoke the ISRSUPC program, the SYSIN file needs to have something like this:
Code:
SRCHFOR  'MYTEXT'         

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
View user's profile Send private message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 183
Location: Toronto, ON, Canada

PostPosted: Fri Jan 06, 2012 12:23 am    Post subject: Re: Srchfor in REXX
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm


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