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

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


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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: 290
Location: Basel, Switzerland

PostPosted: Fri Mar 17, 2006 8:51 pm
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
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: 290
Location: Basel, Switzerland

PostPosted: Mon Mar 20, 2006 4:45 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts DELETE SPUFI DB2 1
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts How to delete a user's alias from the... JCL & VSAM 11
No new posts Duplicate several members of/in one l... JCL & VSAM 7
No new posts Underscore was not populated to onlin... CICS 1
Search our Forums:

Back to Top