Search in Rexx



IBM's Command List programming language & Restructured Extended Executor

Search in Rexx

Postby debo » Sat Apr 17, 2010 6:00 pm

Hi,

I am very new to Rexx.i have a requirement like :
We are going to change some Existing field in production.So we need to do impact analysis before changing the field.
1.So firls we need to search a PDS library where all the COBOL pgms are there.
2.We need to listout all the COBOL pgms where and all that field used & then we need to find where and all these COBOL pgms are being used - we need to search another PDS where JCLPROCS are there....

Could you please provide rexx code for this ?

In short. First we need to search for a field in a PDS(1).The founded member names shud be searched again in a new PDS (2).
debo
 
Posts: 19
Joined: Sat Apr 17, 2010 5:26 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Search in Rexx

 

Re: Search in Rexx

Postby MrSpock » Sat Apr 17, 2010 6:48 pm

So, run a search (using the SuperC utility) and take the resulting output, and pull out the member names.

Then you can run SuperC again searching all members of the other PDS for any of the listed member names.

There's not much of a reason to write much REXX code here.
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: Search in Rexx

Postby debo » Sun Apr 18, 2010 4:51 pm

Hi Could you please Explain how its possible in Super C? I am unable to get the desired result
debo
 
Posts: 19
Joined: Sat Apr 17, 2010 5:26 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Search in Rexx

Postby dick scherrer » Sun Apr 18, 2010 8:46 pm

Hello,

How did you execute superc?

I am unable to get the desired result
Posting "it didn't work" is a complete waste of everyone's time. . .

What happened that was not what you wanted? What did you want? Did this abend?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Search in Rexx

Postby debo » Tue Apr 20, 2010 7:49 pm

Hi,

Sorry..Frankly speaking, i have done the first step only..I can able to search for the 'String' in a PDS (Say a pds which is having all COBOL pgms).After listing out all the modules,how can we search all these modules in another PDS ?

I have NO idea how to do this with Super C or 3.14 option...Can you provide the step by step process so that i can try and let you know if i face any difficulties.....
debo
 
Posts: 19
Joined: Sat Apr 17, 2010 5:26 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Search in Rexx

Postby MrSpock » Wed Apr 21, 2010 1:22 am

A possible template:

/* REXX */                                                     
"ALLOC F(newdd) DA(COBOL) SHR REU"                         
"ALLOC F(outdd) NEW REU UNIT(VIO) SP(1,1) CYLINDERS"           
"ALLOC F(sysin) NEW REU UNIT(VIO) RECFM(F B) LRECL(80)"         
Queue "SRCHFOR  'FILE-STATUS'"                                 
"EXECIO "Queued()" DISKW sysin (FINIS"                         
"CALL *(ISRSUPC) 'SRCHCMP,ANYC'"                               
"EXECIO * DISKR outdd (STEM supc. FINIS"                       
Do i = 1 To supc.0                                             
  Parse Var supc.i word1 word2 word3 word4 .                   
  If word2 = '---------' &,                                     
     word3 = 'STRING(S)' &,                                     
     word4 = 'FOUND' Then                                       
    Do                                                         
      Queue "SRCHFOR  'PGM="word1"'"                           
    End                                                         
End                                                             
"ALLOC F(newdd) DA(JCL) SHR REU"                               
"EXECIO "Queued()" DISKW sysin (FINIS"                         
"CALL *(ISRSUPC) 'SRCHCMP,ANYC'"                               
"EXECIO * DISKR outdd (STEM supc. FINIS"                       
Do i = 1 To supc.0                                             
  Parse Var supc.i word1 word2 word3 word4 .                   
  If word2 = '---------' &,                                     
     word3 = 'STRING(S)' &,                                     
     word4 = 'FOUND' Then                                       
    Do                                                         
      Say supc.i                                               
    End                                                         
End                                                             
Exit 0                                                         
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: Search in Rexx

Postby dick scherrer » Wed Apr 21, 2010 1:52 am

Hello,

After listing out all the modules,how can we search all these modules in another PDS
Use the module/member names found in the first superc to search the other partitioned datasets. . .

I have NO idea how to do this with Super C or 3.14 option...
You would use the same process you used for the first search. If you run the process in batch, you can use the output from the first search as input to another - either manually or by writing some kind of code. . .

Can you provide the step by step process so that i can try and let you know if i face any difficulties.....
The process is somewhat straightforward. Take the output of the first search and use this (or part of this) as input to the searches in the other PDSs. If you choose to try to automate this, we can probably help when you get stuck.

We will help getting things to run, but we don't simply "do it for you". . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post