REXX to extract member names in PDS
REXX to get the membernames in PDS
The following Rexx code can be used to extract member names inside a PDS. This may prove very useful if you want to perform a repeated action on all the members of a PDS, just for example you may want to replace a string with a new value in all the members, then this REXX code will help you to get the list of all members in a PDS and you can write other steps in the macro to perform the steps on these members.
/* REXX PDS */
THEPDS = "'USERID.ABC.XYZ'"
X = OUTTRAP('ML.')
"LISTDS "THEPDS" MEMBERS"
X = OUTTRAP('OFF')
DO N = 7 TO ML.0
PARSE VAR ML.N MEMBER
MEMBER=STRIP(MEMBER)
SAY "MEMBER NAME IS ==>" MEMBER
END
EXIT 0
Comments
Anonymous
Tue, 01/04/2011 - 13:35
Permalink
rexx for getting members list in PDS
Ima not sure but i tried this code it is not getting results it is giving error and iam not able to exit also
can u please let me know the exact code
Anonymous
Wed, 03/13/2013 - 11:13
Permalink
ans
use below command:
type "SAVE LIST" command line
go to 3.4 option
and check the userid.list.member file will be generated that contains all the members names of ur pds
if ur satisfied call
08888845628
siteadmin
Tue, 01/04/2011 - 13:55
Permalink
Could you pls provide
Could you pls provide snapshots of the error messages that you are getting?
Hope you have given the correct PDS name.
Anonymous
Mon, 01/23/2012 - 13:48
Permalink
The Exact Code
/* REXX PDS */
THEPDS = "'USERID.ABC.XYZ'"
X = OUTTRAP('ML.')
"LISTDS '"THEPDS"' MEMBERS"
X = OUTTRAP('OFF')
DO N = 7 TO ML.0
PARSE VAR ML.N MEMBER
MEMBER=STRIP(MEMBER)
SAY "MEMBER NAME IS ==>" MEMBER
END
EXIT 0
Anonymous
Tue, 07/10/2012 - 09:41
Permalink
Rexx Tool
Hi,
I want to extract the dependencies from OPC scheduler using rexx tool,
Could you please help in the code ?
Anonymous
Thu, 11/29/2012 - 13:44
Permalink
how to write it in a file
hi ,
the code works fine and displays the result immediately. I want to write the result in a file. how to do it.
Anonymous
Wed, 06/12/2013 - 07:34
Permalink
Rexx code to extract PDS in member
I have tried the below code
/* REXX PDS */
THEPDS = "'USERID.ABC.XYZ'"
X = OUTTRAP('ML.')
"LISTDS "THEPDS" MEMBERS"
X = OUTTRAP('OFF')
DO N = 7 TO ML.0
PARSE VAR ML.N MEMBER
MEMBER=STRIP(MEMBER)
SAY "MEMBER NAME IS ==>" MEMBER
END
EXIT 0
But am getting the RC(-3) saying that bad arithmetic expression in line number 7.
Please help to resolve this issue.