Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Delete all the members of an online PDS but not the PDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
jrwasko

New User


Joined: 08 Mar 2006
Posts: 1
Location: Chicago

PostPosted: Wed Mar 08, 2006 1:52 am    Post subject: Delete all the members of an online PDS but not the PDS
Reply with quote

We looked at IEBUPDTE among many other utilities and have not successfully found anything to do this. IEBUPDTE seems like the most likely candidate but how.

Right now I plan on putting in a steps to close the datasets to CICS, rename the PDS, reallocate under the prod name, and the open the PDS back to CICS.

Is there a better way?
Back to top
View user's profile Send private message

martijn

New User


Joined: 09 Mar 2006
Posts: 14
Location: The Netherlands

PostPosted: Fri Mar 17, 2006 8:18 pm    Post subject:
Reply with quote

Hi,

Here's how I do it, using IDCAMS! N.B.: read the comment statement at the beginning of the job to understand how the step works!:

Code:

//* -------------------------------------------------------------------
//* *** <S030> - PROCESS THE DELETE-STATEMENTS                         
//*            - FILE(DD1) NEEDED TO PREVENT AN EXCLUSIVE ENQ   
//*              ON THE ENTIRE PDS; I.E.: MEMBER-DELETE WILL WORK,     
//*              EVEN IF PDS IS IN USE! 
//*            - example.PARMLIB HAS THE DELETE-STATEMENTS                             
//*            - DELETE-CARDS WILL BE LIKE THIS:                       
//*               DELETE example.JOBLIB(JOBNAME) FILE(DD1)           
//* -------------------------------------------------------------------
//S030    EXEC PGM=IDCAMS
//SYSPRINT DD  SYSOUT=*
//SYSOUT   DD  SYSOUT=*                                                 
//DD1      DD  DSN=example.JOBLIB,DISP=SHR                           
//SYSIN    DD  DISP=SHR,DSN=example.PARMLIB(DELSTAT)             


N.B.: as far as I know, you can't use wildcards, so there has to be a delete-statement for every member! I use a REXX to create a list of members in a PDS, and to create the delete-statements in the parmlib. If you want, I can give you the JCL and REXX-code I use for that...
Back to top
View user's profile Send private message
martin9

Active User


Joined: 01 Mar 2006
Posts: 288
Location: Basel, Switzerland

PostPosted: Fri Mar 17, 2006 8:51 pm    Post subject:
Reply with quote

hy jrwasko,

the way you want to do it,
is a very pragmatic one.
if you have a lot of members in that pds,
you will be much faster, when deleting
the pds an reallocate it, instead of deleting
all the members. anyway the space used
won't be freed after deletion of all the members,
therefore after deletion, compress this stuff also.

this means not that martijn is wrong.
the job he is providing is a good one indeed...

martin9
Back to top
View user's profile Send private message
martijn

New User


Joined: 09 Mar 2006
Posts: 14
Location: The Netherlands

PostPosted: Mon Mar 20, 2006 2:58 pm    Post subject:
Reply with quote

Hi,

I have a job in production in which I use the above step. Just to clarify; there are two reasons for me to do it the way I described:
- I can't simply delete the PDS in my job, as it's in use by OPC.
- I don't want to delete all members! Just those eligible for delete (all jobs in this PDS have a comment-statement after the job-card indicating there delete-date. I use a REXX to select the ones that can be deleted).

Anyway,
when I was setting up this job to delete old members from a PDS, I got stuck for a while as I was faced with the problem of not being able to delete members from a dataset in use. Just wanted to show you how you can delete PDS-members without having to close the dataset first!

Martin9,
good point about freeing the unused space. Kinda forgot about that...
I'm sure there's an easy jcl-step to do this, which I can add to my job...
Back to top
View user's profile Send private message
martin9

Active User


Joined: 01 Mar 2006
Posts: 288
Location: Basel, Switzerland

PostPosted: Mon Mar 20, 2006 4:45 pm    Post subject:
Reply with quote

hy,

yes to do any compress on any pds,
use IEBCOPY on itself, i.e.
the indataset is the same as outdataset...

martin9
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copying Panvalet members to PDS LOGESHWARAN K CA Products 4 Mon Mar 06, 2017 10:45 am
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts 24x7 online logs using DSN1LOGP (simi... SRICOBSAS DB2 3 Thu Aug 18, 2016 11:52 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us