IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

PDS multiple members delete


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sekhar redy

New User


Joined: 22 Aug 2008
Posts: 14
Location: Bangalore

PostPosted: Mon Aug 25, 2008 2:45 pm
Reply with quote

Hi,

Can any one please tell me , is thre any JCL utility to delete multiple PDS members like abc* in a single batch JCL statement??
i mean i want to delete all the abc* members in PDS x.y.z using a batch JCL. Is it is possible?
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Aug 25, 2008 2:53 pm
Reply with quote

Hi shekhar,
here is sample code
Code:

//SCRATCH1 JOB (acct#),'SCRATCH PDS Members',CLASS=U,MSGCLASS=H
 //*
 //*      Scratch PDS Members - Examples
 //*
 //SCRATCH EXEC PGM=IKJEFT01
 //STEPLIB  DD DSN=<SCRATCH Load Library>,DISP=SHR
 //SYSTSPRT DD SYSOUT=*
 //SYSTSIN  DD *

  /* Scratch a single member */

 SCRATCH 'GSFSOFT.FILE183.PDS(FASTPATH)'

  /* Scratch several members and compress */

 SCRATCH 'GSFSOFT.FILE183.PDS' +
         MEMBERS(FASTPATH,COMPR*) +
         COMPRESS

  /* Empty a load-library and compress */

 SCRATCH 'GSFSOFT.TEST.LOAD' MEMBERS(*)

  /* Delete specified load-modules and remove them from LLA */

 SCRATCH 'STAGE.PARMLIB' MEMBERS(ABC* *JKL*) XM(*123 ABC%%EE) LLA

 /*


Hope this helps
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Aug 25, 2008 2:58 pm
Reply with quote

You also can call scratch program directly
provided you are giving steplib for scratch pgm
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Mon Aug 25, 2008 3:04 pm
Reply with quote

Sekhar,

You can find everything about SCRATCH HERE
Back to top
View user's profile Send private message
sekhar redy

New User


Joined: 22 Aug 2008
Posts: 14
Location: Bangalore

PostPosted: Mon Aug 25, 2008 3:17 pm
Reply with quote

hi sambaji, and aaru,

thanks for your responses. I have already tried with the SCRATCH option, but i think we have to provide a seperate SCRATCH load library, to execute this command. But i dont have that SCRATCH in my system load libraries. Is there any other way to do this?
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Mon Aug 25, 2008 3:41 pm
Reply with quote

I think SCRATCH is a program provided by Gilbert Saint Flour.
I don't believe it is free.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Aug 25, 2008 3:41 pm
Reply with quote

Look at IDCAMS DELETE

And DO NOT post the same topic more than once !
Back to top
View user's profile Send private message
sekhar redy

New User


Joined: 22 Aug 2008
Posts: 14
Location: Bangalore

PostPosted: Mon Aug 25, 2008 3:50 pm
Reply with quote

hi,

IDCAMS delete wont allow the generic qualifier '*' in the SYSIN card for the PDS member name.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Aug 25, 2008 4:12 pm
Reply with quote

Unfortunately that is true, you will need one card for each member.

Have you considered using a REXX to generate and execute that the cards for you. There are numerous examples on the forum for the REXX code that will list the members of a PDS, so all you need to do is to wrap around a little code to generate and execute the IDCAMS DELETE statements.

I also believe that there are a few SORT solutions to building cards from a listing or input file if REXX is not your cup of tea.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Aug 25, 2008 4:27 pm
Reply with quote

Hi Expat,
expat wrote:
And DO NOT[/b] post the same topic more than once !
Other post, which is deleted I think, was different..that topic was asking "How to delete a Member which exist in Multiple PDSs", while this one asks " 'Delete Multiple members' from a single PDS"..little different, I believe..
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Aug 25, 2008 4:33 pm
Reply with quote

Oh well, can't win them all icon_rolleyes.gif
Back to top
View user's profile Send private message
sekhar redy

New User


Joined: 22 Aug 2008
Posts: 14
Location: Bangalore

PostPosted: Mon Aug 25, 2008 4:38 pm
Reply with quote

yes anuj..those two topics are different. As i am new to the group, i was wondering why they have deleted the other one. Thank you..

And i have seen REXX to do this, and even IDCAMS delete where we will give all the members one by one and keep them in the SYSIN.

like //SYSIN DD DSN=MEMLISTFILE,DISP=SHR, and member list file containing DELETE X.Y.Z(MEM1)
DELETE X.Y.Z(MEM2)
DELETE X.Y.Z(MEM3) and so on...

but i actually want to know is there any way, to do it simpler, using some JCL utilities. As this is the ExpertForum, i thought i may get some better way of doing it.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Aug 25, 2008 4:42 pm
Reply with quote

Afraid not. But in a way it may be perceived as safer having to delete each member individually.
Back to top
View user's profile Send private message
sekhar redy

New User


Joined: 22 Aug 2008
Posts: 14
Location: Bangalore

PostPosted: Mon Aug 25, 2008 5:03 pm
Reply with quote

expat,

i didnt understand what you mean.. If i have to delete some 1000 members, it is not easy to delete thiose 1000 members 1 by 1 right..
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Aug 25, 2008 5:11 pm
Reply with quote

Just an observation that if you could use a wildcard in the member field, and you mistyped it, then you would be able to wipe out a whole load in one fell swoop.

It looks as though REXX or SORT will be the way for you to go.

I may have something similar in my archive, and will post it if I have.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Aug 25, 2008 5:23 pm
Reply with quote

sekhar redy,
Quote:

using some JCL utilities


well, one of the problems in this expert forum
is that corrections have to continually begiven for such things as the above,
which is actually an exercise in addressing rookie level problems.

A jcl utility would be a utility(s) that affects JCL.


now, sekhar red,
back to your problem.
this is an IBM mainframe not a windoz forum. Don't have drag&drop here.

Actually we do. we write rexx scripts
(sometime using LMM.. utiltites, sometimes just a scrub of listds, etc...)
to generate control cards for a utility - thus enabling MASS instead of single actions.

Now unfortunately, that means you have to know a little bit more than how to spell IBM.
Most people can not spell Microsoft, yet they can drag&drop to their hearts content.


There are all kinds of ways to automatically generate multiple parms for control cards,
and many have been suggested here.
If you have more questions, post them.

Most of the experienced posters will gladly help someone when they encounter an error or have a problem
with what they are trying to accomplish.
Few have time for those who think things are too hard.

you have to develop a library of your own utilites,
which can be modified or used for other purposes.
If you would take the time to go thru documentation and visit web sites
there are more than enough examples to get you started. But, you have to
1) realize the effort involved in developing these personal libraries and
2) you need to understand a few things about computers.

Now, if you have money, there are several here that will trade (your money for their routines).
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Aug 25, 2008 9:44 pm
Reply with quote

Hello,

Given the "size" of the update and the lack of familiarity of the tools, i strongly recommend a proven backup of the PDS(s) before deleting anything.

A "proven backup" is one that you have actually retrieved "backed up" information from. An untested backup is only a dataset that might have useful content. . .
Back to top
View user's profile Send private message
sekhar redy

New User


Joined: 22 Aug 2008
Posts: 14
Location: Bangalore

PostPosted: Tue Aug 26, 2008 9:53 am
Reply with quote

Any more answers please...
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Aug 26, 2008 10:13 am
Reply with quote

Hello,

Quote:
As this is the ExpertForum, i thought i may get some better way of doing it.
The way many experts accomplish something like this is to create a list of the members to be deleted, create a backup of the pds where they are currently stored, delete the listed members.

When you run the delete job, you will have an audit trail of each member that was deleted.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts DELETE SPUFI DB2 1
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Multiple table unload using INZUTILB DB2 2
Search our Forums:

Back to Top