DELETE members



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Re: DELETE members

Postby steve-myers » Thu Oct 07, 2010 4:23 am

One reason to delete the members but not delete/reallocate the data set is there may be security issues about deleting and reallocating the data set. This happened to me long, long ago. You only need update access to delete members, but (typically) alter access to delete/reallocate the data set. Another, though very rare, issue may be an extents issue. If the data set is in multiple extents, you may not be able to reallocate the same size data set on the same volume. In a very bad case scenario, you have a data set with 15 tracks in 15 extents. You might not be able to get 15 tracks, much less 1 cylinder, on the volume in a delete/reallocate scenario.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: DELETE members

Postby cvrupesh » Thu Oct 07, 2010 7:11 pm

Hi NicC..

I had read the docs and tried doing it.
But JCL when checked for syntax errors says "Dataset not found".

The doc says:
This parameter must be the first parameter following DELETE. entryname is the name of the entry to be deleted. A generic name can be coded to delete multiple entries with one entryname. (For example, GENERIC.*.BAKER is a generic name where * is any 1-to-8 character simple name.) Here is an example of how generic level DELETE works given the following data sets:
1) AAA.BBB.CCC.DDD
2) AAA.BBB.CCC.DDD
3) AAA.BBB.CCC.DDD.EEE
4) AAA.BBB.CCC

DELETE AAA.* results in the deletion of no data sets.
DELETE AAA.BBB.* results in the deletion of data set #4
DELETE AAA.BBB.*.DDD results in the selection of data sets #1 and #2
DELETE AAA.BBB.*.DDD.EEE results in the deletion of data set #3.

When a generic level name is specified, only one qualifier can replace the asterisk (*).



My JCL Looks like below:


//USERTEST JOB 3,'DELETE',CLASS=1,MSGCLASS=Y
//*
//STEP01 EXEC PGM=IDCAMS
//SYSOUT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
/ DELETE XM25.UBI04.*.AUG09
/*
//

When I compiled it Cond Code is 08 with the message:
"/ DELETE XM25.UBI04.*.AUG09
CAY6079E DATA SET "XM25.UBI04.*.AUG09" SPECIFIED AS OLD OR SHR, BUT
CANNOT BE FOUND
"
Thanks Always,
-Rupesh.
cvrupesh
 
Posts: 20
Joined: Tue Jun 02, 2009 9:59 am
Location: Bangalore
Has thanked: 0 time
Been thanked: 0 time

Re: DELETE members

Postby NicC » Thu Oct 07, 2010 8:56 pm

1) You do NOT conpile JCL - you submit it
2) IDCAMS control cards do not start with a /
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: DELETE members

Postby cvrupesh » Tue Oct 12, 2010 3:38 pm

But If I submit the same JCL with out giving the Wildcard * and with an known Dataset it is working without any issues.
Thanks Always,
-Rupesh.
cvrupesh
 
Posts: 20
Joined: Tue Jun 02, 2009 9:59 am
Location: Bangalore
Has thanked: 0 time
Been thanked: 0 time

Re: DELETE members

Postby Robert Sample » Tue Oct 12, 2010 4:05 pm

What is the exact data set name you're trying to delete with the wild card? XM25.UBI04.A.AUG09 would be found and deleted, whereas XM25.UBI04.A.B.AUG09 would not since the wild card in IDCAMS only qualifies a single level (a point often missed).
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: DELETE members

Postby cvrupesh » Wed Oct 13, 2010 3:19 pm

Hi Robert,

I have so many datasets suffixed with Date fields and I am trying to remove all of the files which belongs to 2009.
Some Examples look like:
XM25.ABC.DEF.D010109
XM25.ABC.DEF.D020109
XM25.ABC.DEF.D030109 and so on.

Because I have more than 1000 different files with such date suffixed, is it possible to delete all of them in a single go?
Thanks Always,
-Rupesh.
cvrupesh
 
Posts: 20
Joined: Tue Jun 02, 2009 9:59 am
Location: Bangalore
Has thanked: 0 time
Been thanked: 0 time

Re: DELETE members

Postby enrico-sorichetti » Wed Oct 13, 2010 5:11 pm

for once in a while task why not use ispf and while in the members list
type in the command line s xyz* d
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: DELETE members

Postby cvrupesh » Wed Oct 13, 2010 5:34 pm

Sorry, but I did not understand what you were suggesting to me here.. :cry:
Thanks Always,
-Rupesh.
cvrupesh
 
Posts: 20
Joined: Tue Jun 02, 2009 9:59 am
Location: Bangalore
Has thanked: 0 time
Been thanked: 0 time

Re: DELETE members

Postby enrico-sorichetti » Wed Oct 13, 2010 6:08 pm

Sorry, but I did not understand what you were suggesting to me here..


is this a repetitive/procedural task ?
Yes) You can stop reading
No) it's once in a while, keep reading

do You know how to use ISPF
no) stop reading and get proper training
Yes) keep reading

from the ISPF main menu
Menu  Utilities  Compilers  Options  Status  Help
——————————————————————————————————————————————————————————————————————————————
ISPF Primary Option Menu
Option ===>

0  Settings      Terminal and user parameters            User ID . : $$$$$$$
1  View          Display source data or listings         Time. . . : 14:26
2  Edit          Create or change source data            Terminal. : 3278
3  Utilities     Perform utility functions               Screen. . : 1
4  Foreground    Interactive language processing         Language. : ENGLISH
5  Batch         Submit job for language processing      Appl ID . : ISR
6  Command       Enter TSO or Workstation commands       TSO logon : ISPFPROC
7  Dialog Test   Perform dialog testing                  TSO prefix: $$$$$$$
9  IBM Products  IBM program development products        System ID : $$$$
10 SCLM          SW Configuration Library Manager        MVS acct. : ACCT#
11 Workplace     ISPF Object/Action Workplace            Release . : ISPF 6.0
M  More          Additional IBM Products


Enter X to Terminate using log/list defaults


choose option 3, it will take You to
Menu  Help
——————————————————————————————————————————————————————————————————————————————
Utility Selection Panel
Option ===>

1  Library     Compress or print data set.  Print index listing.  Print,
rename, delete, browse, edit or view members
2  Data Set    Allocate, rename, delete, catalog, uncatalog, or display
information of an entire data set
3  Move/Copy   Move, or copy members or data sets
4  Dslist      Print or display (to process) list of data set names.
Print or display VTOC information
5  Reset       Reset statistics for members of ISPF library
6  Hardcopy    Initiate hardcopy output
7  Transfer    Download ISPF Client/Server or Transfer data set
8  Outlist     Display, delete, or print held job output
9  Commands    Create/change an application command table
11 Format      Format definition for formatted data Edit/Browse
12 SuperC      Compare data sets                             (Standard Dialog)
13 SuperCE     Compare data sets Extended                    (Extended Dialog)
14 Search-For  Search data sets for strings of data          (Standard Dialog)
15 Search-ForE Search data sets for strings of data Extended (Extended Dialog)
16 Tables      ISPF Table Utility
17 Udlist      Print or display (to process) z/OS UNIX directory list


choose option 1, it will take You to
Menu  RefList  Utilities  Help
——————————————————————————————————————————————————————————————————————————————
Library Utility
Option ===>

blank Display member list      I Data set information          B Browse member
C Compress data set        S Short data set information    D Delete member
X Print index listing      E Edit member                   R Rename member
L Print entire data set    V View member                   P Print member

Enter "/" to select option
ISPF Library:                      /  Confirm Member Delete
Project . . .                      Enhanced Member List
Group . . . .          . . .          . . .          . . .
Type  . . . .
Member  . . .             (If B, D, E, P, R, V, or blank selected)
New name  . .             (If R selected)

Other Partitioned or Sequential Data Set:
Name  . . . . . . .
Volume Serial . . .           (If not cataloged)

Data Set Password  . .           (If password protected)


enter the datasete name
hope You will be understand be able to
ant it will take You to something similar to
Menu  Functions  Confirm  Utilities  Help
——————————————————————————————————————————————————————————————————————————————
LIBRARY           $$$$$$$.$$$$.$$$$$$                       Row 00001 of 00004
Command ===>                                                  Scroll ===> PAGE
Name     Prompt       Size   Created          Changed          ID
_________ A                         1  2010/10/08  2010/10/08 10:41:48  IBMUSER
_________ B0                        1  2010/10/13  2010/10/13 14:31:09  ADCDMST
_________ B1                        1  2010/10/13  2010/10/13 14:31:25  ADCDMST
_________ B3                        1  2010/10/13  2010/10/13 14:31:39  ADCDMST
**End**


in the command line, hope You can find it enter
Menu  Functions  Confirm  Utilities  Help
——————————————————————————————————————————————————————————————————————————————
LIBRARY           $$$$$$$.$$$$.$$$$$$                       Row 00001 of 00004
Command ===> s b* d                                           Scroll ===> PAGE
Name     Prompt       Size   Created          Changed          ID
_________ A                         1  2010/10/08  2010/10/08 10:41:48  IBMUSER
_________ B0                        1  2010/10/13  2010/10/13 14:31:09  ADCDMST
_________ B1                        1  2010/10/13  2010/10/13 14:31:25  ADCDMST
_________ B3                        1  2010/10/13  2010/10/13 14:31:39  ADCDMST
**End**

and press enter
according to Your setup the members will disappear or You will be asked for confirmation
Menu  Functions  Confirm  Utilities  Help
— ◊————————————————————————————————————————————————————————◊ —————————————————
L â—Š         ISPF Utilities Confirm Member Delete           â—Š ow 00001 of 00004
C â—Š                                                        â—Š  Scroll ===> PAGE
â—Š Data Set Name:                                         â—Š ged          ID
_ â—Š I$$$$$$$.$$$$.$$$$$$                                    â—Š  10:41:48  IBMUSER
_ â—Š                                                        â—Š  14:31:09  ADCDMST
_ â—Š Member to be Deleted:                                  â—Š  14:31:25  ADCDMST
_ â—Š B0                                                     â—Š  14:31:39  ADCDMST
â—Š                                                        â—Š
â—Š    Set member delete confirmation off                  â—Š
â—Š                                                        â—Š
â—Š Press ENTER to confirm delete.                         â—Š
â—Š Press CANCEL or EXIT to cancel delete.                 â—Š
â—Š                                                        â—Š
â—Š                                                        â—Š
◊————————————————————————————————————————————————————————◊


if You feel like enter a slash in set delete confirmation off and press enter
and You will have the happy ending of Your wanderings thru ispf panels and facilities
Menu  Functions  Confirm  Utilities  Help
——————————————————————————————————————————————————————————————————————————————
LIBRARY           IBMUSER.TEST.JCLLIB                       Row 00002 of 00004
Command ===>                                                  Scroll ===> PAGE
Name     Prompt       Size   Created          Changed          ID
_________ B0       *Deleted
_________ B1       *Deleted
_________ B3       *Deleted
**End**


screen formatting will be ugly because of cut and paste but still understandable
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: DELETE members

Postby NicC » Wed Oct 13, 2010 6:24 pm

Looking at your sample datasetname list your generic must be something like XM25.ABC.DEF.*09. This is invalid. An * must replace the ENTIRE name level. Check out the manual and see if it anywhere says *xx or xx* or xx*yy is allowed. ALL examples show .*. or .*
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

PreviousNext

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post