View previous topic :: View next topic
|
Author |
Message |
sekhar redy
New User
Joined: 22 Aug 2008 Posts: 14 Location: Bangalore
|
|
|
|
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 |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
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 |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
You also can call scratch program directly
provided you are giving steplib for scratch pgm |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Sekhar,
You can find everything about SCRATCH HERE |
|
Back to top |
|
|
sekhar redy
New User
Joined: 22 Aug 2008 Posts: 14 Location: Bangalore
|
|
|
|
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 |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
I think SCRATCH is a program provided by Gilbert Saint Flour.
I don't believe it is free. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Look at IDCAMS DELETE
And DO NOT post the same topic more than once ! |
|
Back to top |
|
|
sekhar redy
New User
Joined: 22 Aug 2008 Posts: 14 Location: Bangalore
|
|
|
|
hi,
IDCAMS delete wont allow the generic qualifier '*' in the SYSIN card for the PDS member name. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Oh well, can't win them all |
|
Back to top |
|
|
sekhar redy
New User
Joined: 22 Aug 2008 Posts: 14 Location: Bangalore
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Afraid not. But in a way it may be perceived as safer having to delete each member individually. |
|
Back to top |
|
|
sekhar redy
New User
Joined: 22 Aug 2008 Posts: 14 Location: Bangalore
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
sekhar redy
New User
Joined: 22 Aug 2008 Posts: 14 Location: Bangalore
|
|
|
|
Any more answers please... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|