IBM MAINFRAME HELP & SUPPORT FORUMS
Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
 

PDS multiple members delete

THIS IS AN ARCHIVE FORUM: CLICK HERE TO GO TO THE ORIGINAL TOPIC
Goto page 1, 2  Next
 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> SMS & VSAM
View previous topic :: View next topic  
Author Message
sekhar redy



Joined: 22 Aug 2008
Posts: 9
Location: Bangalore

Posted: Mon Aug 25, 2008 2:45 pm    Post subject: PDS multiple members delete  

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  
Sambhaji



Joined: 16 Feb 2007
Posts: 267
Location: Pune, India

Posted: Mon Aug 25, 2008 2:53 pm    Post subject:  

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  
Sambhaji



Joined: 16 Feb 2007
Posts: 267
Location: Pune, India

Posted: Mon Aug 25, 2008 2:58 pm    Post subject:  

You also can call scratch program directly
provided you are giving steplib for scratch pgm
Back to top  
Aaru



Joined: 03 Jul 2007
Posts: 1148
Location: Mumbai - India

Posted: Mon Aug 25, 2008 3:04 pm    Post subject: Reply to: PDS multiple members delete  

Sekhar,

You can find everything about SCRATCH HERE
Back to top  
sekhar redy



Joined: 22 Aug 2008
Posts: 9
Location: Bangalore

Posted: Mon Aug 25, 2008 3:17 pm    Post subject: Reply to: PDS multiple members delete  

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



Joined: 26 Nov 2005
Posts: 313
Location: Belgium

Posted: Mon Aug 25, 2008 3:41 pm    Post subject:  

I think SCRATCH is a program provided by Gilbert Saint Flour.
I don't believe it is free.
Back to top  
expat



Joined: 14 Mar 2007
Posts: 3544
Location: Brussels once more ...

Posted: Mon Aug 25, 2008 3:41 pm    Post subject:  

Look at IDCAMS DELETE

And DO NOT post the same topic more than once !
Back to top  
sekhar redy



Joined: 22 Aug 2008
Posts: 9
Location: Bangalore

Posted: Mon Aug 25, 2008 3:50 pm    Post subject: Reply to: PDS multiple members delete  

hi,

IDCAMS delete wont allow the generic qualifier '*' in the SYSIN card for the PDS member name.
Back to top  
expat



Joined: 14 Mar 2007
Posts: 3544
Location: Brussels once more ...

Posted: Mon Aug 25, 2008 4:12 pm    Post subject:  

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 D.



Joined: 22 Apr 2006
Posts: 2229
Location: Phoenix, AZ

Posted: Mon Aug 25, 2008 4:27 pm    Post subject:  

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



Joined: 14 Mar 2007
Posts: 3544
Location: Brussels once more ...

Posted: Mon Aug 25, 2008 4:33 pm    Post subject:  

Oh well, can't win them all :roll:
Back to top  
sekhar redy



Joined: 22 Aug 2008
Posts: 9
Location: Bangalore

Posted: Mon Aug 25, 2008 4:38 pm    Post subject: Reply to: PDS multiple members delete  

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



Joined: 14 Mar 2007
Posts: 3544
Location: Brussels once more ...

Posted: Mon Aug 25, 2008 4:42 pm    Post subject:  

Afraid not. But in a way it may be perceived as safer having to delete each member individually.
Back to top  
sekhar redy



Joined: 22 Aug 2008
Posts: 9
Location: Bangalore

Posted: Mon Aug 25, 2008 5:03 pm    Post subject: Reply to: PDS multiple members delete  

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



Joined: 14 Mar 2007
Posts: 3544
Location: Brussels once more ...

Posted: Mon Aug 25, 2008 5:11 pm    Post subject:  

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  
 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> SMS & VSAM Goto page 1, 2  Next
Page 1 of 2
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM