> -----Original Message-----
> From: IBM Mainframe Discussion List
> [mailto:[EMAIL PROTECTED] On Behalf Of Pommier, Rex R.
> Sent: Monday, January 30, 2006 1:50 PM
> To: [email protected]
> Subject: Basic question on deleting datasets
>
>
> Hi.
>
> I'm afraid I'm in a "can't see the forest because of the trees"
> situation which probably has a very easy answer that I can't see.
>
> I have a disk pack that I need to get a large subset of the
> datasets off
> it as well as uncataloged. Is there some way using IDCAMS or DFSMSdss
> to accomplish this using wildcards so I don't have to list
> each dataset
> separately? IDCAMS apparently only allows me to use a
> single-qualifier
> wildcard which won't do it.
>
> Unless somebody has a better idea as how to proceed here.
> The situation
> is that we have a training system here that is a clone of our
> production. On a semi-regular basis we are requested to refresh the
> training system. The process is to delete the training
> system datasets
> then use DFSMSdss COPY to copy the datasets from production
> to training.
> I have tried just using DFSMSdss COPY with REPlace but apparently the
> REPlace parameter of DSS COPY doesn't work with the
> RENameUnconditional
> because DSS complains about the output datasets already being there.
>
> I don't want to have to list all the datasets individually in IDCAMS
> DELETE statements because that will be a maintenance nightmare.
>
> Environment is z/OS 1.4.
>
> What am I missing?
>
> Rex
>
What I usually do in a case like this is use ISPF option 3.4. I put in
the name of the volume and use the "P" primary command to "Print" the
dataset list to the ISPF list dataset. I then use "LIST", which put up a
"pop up" menu, and select option 3. This tell me the name of the ISPF
list dataset. I then edit this dataset and basically remove the "junk"
and put in the IDCAMS DELETE on the rest with a CHANGE ' ' ' DELETE '
ALL 1. I then wrap this in IDCAMS JCL and submit it.
This works for infrequent use.
If you have need for frequent use, then you can use DFDSS to COPY DELETE
the datasets on the volume to NULLFILE. Something like:
//JS010 EXEC PGM=ADRDSSU,PARM='TYPRUN=NORUN',
// REGION=3M
//INVOL DD DISP=SHR,
// UNIT=SYSDA,
// VOL=SER=LIHTS4
//DUMMY DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//ABNLIGNR DD DUMMY
//SYSIN DD *
COPY -
DS( -
EXCLUDE(SYS1.** -
) -
) -
SPHERE -
PURGE -
LIDD(INVOL) -
DELETE -
FORCE -
OUTDD(DUMMY)
/*
//
You need to remove the PARM='TYPRUN=NORUN' once you are comfortable that
nothing will be deleted that you don't really want. Also, the above JCL
was fetched from my bio-memory instead of an actual, running, job. There
may be bugs!
--
John McKown
Senior Systems Programmer
UICI Insurance Center
Information Technology
This message (including any attachments) contains confidential
information intended for a specific individual and purpose, and its
content is protected by law. If you are not the intended recipient, you
should delete this message and are hereby notified that any disclosure,
copying, or distribution of this transmission, or taking any action
based on it, is strictly prohibited.
----------------------------------------------------------------------
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