View previous topic :: View next topic
|
Author |
Message |
jrwasko
New User
Joined: 08 Mar 2006 Posts: 1 Location: Chicago
|
|
|
|
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 |
|
|
martijn
New User
Joined: 09 Mar 2006 Posts: 14 Location: The Netherlands
|
|
|
|
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 |
|
|
martin9
Active User
Joined: 01 Mar 2006 Posts: 290 Location: Basel, Switzerland
|
|
|
|
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 |
|
|
martijn
New User
Joined: 09 Mar 2006 Posts: 14 Location: The Netherlands
|
|
|
|
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 |
|
|
martin9
Active User
Joined: 01 Mar 2006 Posts: 290 Location: Basel, Switzerland
|
|
|
|
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 |
|
|
|