Finding a string in the pds members



IBM's Command List programming language & Restructured Extended Executor

Finding a string in the pds members

Postby jvinoth » Fri Jun 15, 2012 5:46 pm

Hi,
I need to search for a string like 'pgm=sort' in the pds members.
if that string found i need to write the proc name into seperate file using REXXplease tell me how to do this.
jvinoth
 
Posts: 132
Joined: Fri Nov 18, 2011 3:13 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Finding a string in the pds members

Postby jvinoth » Fri Jun 15, 2012 5:47 pm

Need to wite the list of members which has the string like that and need to write the only member name into the other file.
jvinoth
 
Posts: 132
Joined: Fri Nov 18, 2011 3:13 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Finding a string in the pds members

Postby Akatsukami » Fri Jun 15, 2012 6:04 pm

Your post is incoherent:
  1. Justify why SRCHFOR cannot be used.
  2. Where is the PDS name supposed to come from?
  3. What is
    Need to wite the list of members which has the string like that and need to write the only member name into the other file.
    supposed to mean?
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Finding a string in the pds members

Postby jvinoth » Fri Jun 15, 2012 6:57 pm

if it finds the pgm=sort string..ya we can do using srchfor and also 3.14 option.but trying to write in rexx
jvinoth
 
Posts: 132
Joined: Fri Nov 18, 2011 3:13 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Finding a string in the pds members

Postby Ed Goodman » Fri Jun 15, 2012 8:04 pm

Try this:
- Run SRCHFOR in batch.
- examine the JCL that is created
- add alloc/free commands to your rexx
- run the rexx

Something like this:
   /* NOW CALL IDCAMS TO PROCESS IT */                               
                                                                     
   "ALLOC DDNAME(SYSOUT) DSNAME('*')"                                 
   "ALLOC DDNAME(SYSDBOUT) DSNAME('*')"                               
   "ALLOC DDNAME(SYSUDUMP) DSNAME('*')"                               
   "ALLOC DDNAME(AMSDUMP) DSNAME('*')"                               
   "ALLOC DDNAME(SYSABEND) DSNAME('*')"                               
   "ALLOC DDNAME(SYSPRINT) DSNAME('*')"                               
   "ALLOC DDNAME(SYSIN) DSNAME('WTSO.WNEG.SYSIN') SHR"               
                                                                     
 "CALL 'SYS1.LINKLIB(IDCAMS)'"                                       
                                                                     
   COMPILER_RC=RC                                                     
  "FREE DD(SYSOUT,SYSDBOUT,SYSUDUMP,AMSDUMP,SYSABEND,SYSPRINT,SYSIN)"
  "DELETE ('WTSO.WNEG.SYSIN') NONVSAM"                               


This is running IDCAMS, but you get the picture.
Ed Goodman
 
Posts: 341
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post