I liked this. Thanks for posting it.
Regards,
Eric Verwijs
Programmer Analyst | Programmeur-analyste
CPP/ OAS/ IA Production Support Team | Équipe de soutien à la production RPC /
SV / IA
[email protected]
Telephone | Téléphone 613-941-7492
Facsimile | Télécopieur 613-941-4234
National Headquarters | Administration Centrale
Human Resources and Skills Development Canada | Ressources humaines et
Développement des compétences Canada
Government of Canada | Gouvernement du Canada
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of
Victor Gil
Sent: 2010-01-21 9:48 AM
To: [email protected]
Subject: Re: REXX to delete all members of a PDS... serverpac CPPEDELM
The below REXX [from one of the dino sites, forgot which one] does the job.
Can even be used as an "action" against a given PDS on the DSLIST panel.
/* REXX */
/* DELETE ALL MEMBERS OF A GIVEN LIBRARY DSN */
TRACE 'N'
/* TRACE 'R' */
/* TRACE 'O' */
PARSE UPPER ARG DSNAME
DSN = STRIP(DSNAME, 'BOTH', '''') /* IN CASE IT'S IN QUOTES */
QUOTE = "'"
QDSN = QUOTE||DSN||QUOTE /* FULLY QUOTED DSN */
ADDRESS ISPEXEC
"LMINIT DATAID( MYDATAID) DATASET(" QDSN ") ENQ(SHRW)"
"LMOPEN DATAID("MYDATAID") OPTION(OUTPUT)"
"LMMDEL DATAID("MYDATAID") MEMBER(*)"
"LMCLOSE DATAID("MYDATAID")"
"LMFREE DATAID("MYDATAID")"
SAY DSN " IS NOW EMPTY"
EXIT
HTH,
-Victor-
On Tue, 19 Jan 2010 16:45:33 -0800, John Mattson <[email protected]>
wrote:
>Some folks have asked about how to delete all members from a PDS
>without deleting the PDS. I just stumbled across this while doing a
>receive from ServerPac CPP. I noticed this REXX in and amongst the JCL.
>SCPPCENU(CPPEDELM) Everyone who has used CPP should have a copy. Its
only
>about 100 lines of nicely written and documented REXX.
> Below is the basic JCL, of course you need your LOCAL ISPF/TSO
>data sets as in your logon proc...
>
>//DELMEM EXEC PGM=IKJEFT1B,COND=(4000,LT)
>//*
***********************************************************
***
>//* * DELETE ALL MEMBERS OF MASTER DIALOG DATA SETS *
>//* * (EXCEPT SCPPTENU) *
>//*
***********************************************************
***
>//SYSEXEC DD DISP=SHR,DSN=MSYS.ZOS111.OS120544.SCPPCENU
>//SYSPROC DD DISP=SHR,DSN=MSYS.ZOS111.OS120544.SCPPCENU
>//ISPMLIB DD DISP=SHR,DSN=MSYS.ZOS111.OS120544.SCPPMENU
>//ISPPLIB DD DISP=SHR,DSN=MSYS.ZOS111.OS120544.SCPPPENU
>//ISPSLIB DD DISP=SHR,DSN=MSYS.ZOS111.OS120544.SCPPSENU
>//ISPLLIB DD DISP=SHR,DSN=MSYS.ZOS111.OS120544.SCPPLOAD
>//ISPTLIB DD DISP=SHR,DSN=MSYS.ZOS111.OS120544.SCPPTENU
>//ISPPROF DD UNIT=SYSALLDA,DISP=(NEW,DELETE),
>// DCB=(LRECL=80,BLKSIZE=3120,RECFM=FB),
>// SPACE=(CYL,(1,1,1))
>//SYSTSPRT DD SYSOUT=*
>//SYSPRINT DD SYSOUT=*
>//SYSTSIN DD *
> PROFILE PREFIX(AFITSUP)
> ISPSTART CMD(CPPEDELM)
>//SYSIN DD *
>MSYS.CPP.D091130.SCPPCENU
>MSYS.CPP.D091130.SCPPLOAD
>MSYS.CPP.D091130.SCPPMENU
>MSYS.CPP.D091130.SCPPPENU
>MSYS.CPP.D091130.SCPPSENU
>/*
----------------------------------------------------------------------
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
----------------------------------------------------------------------
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