> -----Original Message-----
> From: IBM Mainframe Discussion List
> [mailto:[email protected]] On Behalf Of J R
> Sent: Wednesday, June 30, 2010 10:02 AM
> To: [email protected]
> Subject: Re: Delete all members of a PDS that is allocated
>
> The OP said that job scheduler product has it allocated and
> that assembler may not be used.
OK. Sounds like a foolish restriction to me, but the OP knows his requirements
better than I ever could. The following REXX program will do it. It stinks, but
it works.
/* REXX */
"ALLOC DDN(SYSIN) SPACE(10 10) TRACKS NEW DELETE REUSE ",
"RECFM(F B) LRECL(80) BLKSIZE(3120) DSORG(PS)"
IF RC <> 0 THEN EXIT 8
X = LISTDSI("KILLPDS FILE")
IF X > 4 THEN EXIT 8
IF "PO" <> LEFT(SYSDSORG,2) THEN DO
SAY SYSDSNAME SYSDSORG SYSVOLUME
EXIT 8
END
SAY SYSDSNAME SYSDSORG SYSVOLUME
DUMMY = OUTTRAP("DATA.","*")
"LISTDS '"SYSDSNAME"' MEMBERS"
DUMMY = OUTTRAP("OFF")
DO I = 7 TO DATA.0
MEMBER = SPACE(WORD(DATA.I,1),0)
LINE = " SCRATCH DSNAME="SYSDSNAME","
LINE = LEFT(LINE,71)"X"
QUEUE LINE
LINE = " VOL=SYSDA="SYSVOLUME",MEMBER="MEMBER
QUEUE LINE
"EXECIO 2 DISKW SYSIN"
IF RC <> 0 THEN DO
SAY "ERROR WRITING CONTROL RECORD. ABORTING."
EXIT 16
END
END
"EXECIO 0 DISKW SYSIN(FINIS"
ADDRESS ATTACH "IEHPROGM"
EXIT RC
//STEP010 EXEC PGM=IKJEFT01,
// REGION=4096K,
// DYNAMNBR=40
//SYSTSPRT DD SYSOUT=*
//SYSEXEC DD DSN=my.REXX.EXEC,
// DISP=SHR
//SYSTSIN DD *
EXECUTIL SEARCHDD(YES)
%KILLPDS
/*
//SYSPRINT DD SYSOUT=*
//KILLPDS DD DSN=some.pds,
// DISP=SHR
--
John McKown
Systems Engineer IV
IT
Administrative Services Group
HealthMarkets(r)
9151 Boulevard 26 * N. Richland Hills * TX 76010
(817) 255-3225 phone * (817)-961-6183 cell
[email protected] * www.HealthMarkets.com
Confidentiality Notice: This e-mail message may contain confidential or
proprietary information. If you are not the intended recipient, please contact
the sender by reply e-mail and destroy all copies of the original message.
HealthMarkets(r) is the brand name for products underwritten and issued by the
insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance
Company(r), Mid-West National Life Insurance Company of TennesseeSM and The
MEGA Life and Health Insurance Company.SM
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html