IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Rexx store mamber names found within PDS


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
cfear

New User


Joined: 01 Jul 2010
Posts: 2
Location: UK

PostPosted: Wed Jul 14, 2010 6:36 pm
Reply with quote

Hey guys,

somewhat new to Rexx i am trying to do the following.
1)provide list of members found within a particular pds
2)search entire pds for a specific string
3)replace that string with another.

to date i have been able to search and list all members of a particular database while separately searching specific members for strings to change.

my question is this;

using LISTDS, i have a printed list of members found within a PDS. is there a way to store each member name so when i initiate the change string code it looks at the member names which have been found in the PDS?

i am trying to get around a user having to provide each member name by allowing them to supply a PDS to search.

+
i am aware there may already be a function to do this automatically but as i mentioned i am learning so i am simply experimenting.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Jul 14, 2010 6:44 pm
Reply with quote

cfear wrote:
my question is this;

using LISTDS, i have a printed list of members found within a PDS. is there a way to store each member name so when i initiate the change string code it looks at the member names which have been found in the PDS?


Have you looked at some of the other REXX topics that use LISTDS?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jul 14, 2010 6:45 pm
Reply with quote

What code did you use to get the list of PDS members.
Back to top
View user's profile Send private message
cfear

New User


Joined: 01 Jul 2010
Posts: 2
Location: UK

PostPosted: Wed Jul 14, 2010 6:50 pm
Reply with quote

expat wrote:
What code did you use to get the list of PDS members.


Code:

ADDRESS TSO
'PROFILE NOPREFIX'
SAY "PROG START"
"EXECIO * DISKR PDS (STEM PDS. FINI

DO ILIST = 1 TO PDS.0
I = 0
PDS.ILIST= STRIP(PDS.ILIST,T)

X=OUTTRAP("RES.")
"LISTDS ('"PDS.ILIST"') MEMBERS"
X=OUTTRAP("OFF")

DO I = 7 TO RES.0
RES.I = STRIP(RES.I)
SAY RES.I


the PDS is provided via jcl.

unsure how to go about storing the found membernames
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jul 14, 2010 6:58 pm
Reply with quote

You already have them in the stem variable RES.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts How I Found a Bug in a FORTRAN Compiler All Other Mainframe Topics 4
Search our Forums:

Back to Top