The prize is shared by Andy and Mark. (Take a bow. OK, sit down. Down.
Sit). Thanks for *everyone's* help.
I was aiming in the right direction when I tried an allocation earlier,
but I didn't have the FILE parameter. What worked was this:
ALLOC DD(R21CAT) NEW VOL(R21CAT) UNIT(3390) REU STORCLAS(NULL)"
DEL '"dsn"' FILE(R21CAT) CAT('MVSR21.ICF.MASTER')"
FREE DD(R21CAT)"
STORCLAS(NULL) tells SMS to honor the volume parameter; otherwise the
temporary data set ends up in the SMS pool. Turns out that when this
works, the alias gets deleted also at the same, so the commands to delete
the alias are unnecessary. The updated Rexx is below.
To answer some questions from the thread.
-- I have full ALTER authority to all components.
-- Batch yielded no messages beyond those I posted from TSO.
-- LISTCAT of the usercat showed everything kosher before and after
deleting.
-- I never intended to delete the usercat, just some unneeded data sets
cataloged there.
The Rexx BTW can be entered as a line command on a 3.4 data set list of
volume R21CAT. The dsn is passed to the Rexx fully qualified and quoted. I
stripped off the quotes for use in the alias delete command, which is no
longer necessary. But there it is anyway.
TRACE C
ARG dsn
dsn = STRIP(dsn,B,"'")
"LISTC ENT('"dsn"') CAT('MVSR21.ICF.MASTER')"
IF RC = 0 THEN DO
"ALLOC DD(R21CAT) NEW VOL(R21CAT) UNIT(3390) REU STORCLAS(NULL)"
"DEL '"dsn"' FILE(R21CAT) CAT('MVSR21.ICF.MASTER')"
"FREE DD(R21CAT)"
END
.
.
J.O.Skip Robinson
Southern California Edison Company
Electric Dragon Team Paddler
SHARE MVS Program Co-Manager
626-302-7535 Office
323-715-0595 Mobile
[email protected]
From: Mark Zelden <[email protected]>
To: [email protected],
Date: 06/18/2014 11:25 AM
Subject: Re: IKJ56228I trying to delete a data set
Sent by: IBM Mainframe Discussion List <[email protected]>
On Wed, 18 Jun 2014 08:07:29 -0700, Skip Robinson
<[email protected]> wrote:
>Cleaning up after a ServerPac install. There are some 'operational' data
>sets that I don't want to keep around. One of those is 'SYS1.XCF.CDS03',
>which lives on the 'CAT' volume and cataloged in the ServerPac catalog
>'MVSR21.ICF.MASTER' on the same volume. I wrote a simple Rexx to LISTC
the
>data set and, if it exists, delete it. LISTC shows the data set, DELETE
>fails as shown.
>
>I also LISTC and delete the associated alias 'OSR21.SYS1.XCF.CDS03' in
the
>same catalog. That command worked fine. What am I missing for the data
set
>delete? I run this Rexx under foreground TSO.
>
>
> 9 *-* "LISTC ENT('"dsn"') CAT('MVSR21.ICF.MASTER')"
> >>> "LISTC ENT('SYS1.XCF.CDS03') CAT('MVSR21.ICF.MASTER')"
>NONVSAM ------- SYS1.XCF.CDS03
> 13 *-* "DEL '"dsn"' CAT('MVSR21.ICF.MASTER')"
> >>> "DEL 'SYS1.XCF.CDS03' CAT('MVSR21.ICF.MASTER')"
>IKJ56228I DATA SET SYS1.XCF.CDS03 NOT IN CATALOG OR CATALOG CAN NOT BE
>ACCESSED
>IDC0551I ** ENTRY SYS1.XCF.CDS03 NOT DELETED
>IDC0014I LASTCC=8
> +++ RC(8) +++
>
Allocate a DD to the volume (DD1 for example) and add "FILE(DD1)" to
the DELETE command.
--
Mark Zelden - Zelden Consulting Services - z/OS, OS/390 and MVS
ITIL v3 Foundation Certified
mailto:[email protected]
Mark's MVS Utilities: http://www.mzelden.com/mvsutil.html
Systems Programming expert at http://search390.techtarget.com/ateExperts/
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN