View previous topic :: View next topic
|
Author |
Message |
cfear
New User
Joined: 01 Jul 2010 Posts: 2 Location: UK
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
What code did you use to get the list of PDS members. |
|
Back to top |
|
|
cfear
New User
Joined: 01 Jul 2010 Posts: 2 Location: UK
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
You already have them in the stem variable RES. |
|
Back to top |
|
|
|