Normally it is easy to delete all members without REXX.
The command s * d would do this for you.
Incase, if you have a list of members to be deleted from a huge list, then it is better to automate with REXX.
/*REXX*/
PDSNAME = "Your PDS Name"
CALL OUTTRAP "MEM."
"LISTD" "'"PDSNAME"'" "MEMBERS"
CALL OUTTRAP "OFF"
DO I=1 TO MEM.0
IF MEM.I = "--MEMBERS--" THEN LEAVE
END
I = I+1
DO J = I TO MEM.0
PARSE VALUE MEM.J WITH MEMNAME
MEMNAME=STRIP(MEMNAME)
/* You shall have your IF or WHEN condition to delete */
CALL OUTTRAP "DUMMY."
ADDRESS TSO "DELETE '"PDSNAME"("MEMNAME")'"
CALL OUTTRAP "OFF"
END
Subscribe to:
Post Comments (Atom)
Featured Post
REXX Skeleton: Submitting jobs through Rexx
Submitting jobs through REXX and reading the spool through REXX gives us immense potential to automate many manual activities in mainframes....
-
Abend S013 SYSTEM COMPLETION CODE=013 REASON CODE=00000018 AN OPEN WAS ISSUED FOR A PARTITIONED DATASET. THE SPECIFIED MEMBER NAME WAS N...
-
In order to read or write a file using REXX, first step is to allocate a DDNAME. This step is required only when REXX is executed through Fo...
-
A word is defined as a blank delimited set of characters within a string in REXX. The characters in a word can be alpha, numeric, alphanume...
No comments:
Post a Comment