Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
Posted: Fri Mar 16, 2018 2:38 pm Post subject:
Magesh_J wrote:
Hi,
I am trying to write a rexx to delete the data sets which have been used/referenced three months before.
Magesh_J,
I think you are trying to re-inventing the wheel. ADRDSSU does a fantastic job of deleting the datasets based on the Last referenced date. Here is an example of deleting the datasets using ADRDSSU
I suggest you run the jcl with TYPRUN=NORUN so that you can actually see the list of datasets that are going to be delete ( just to make sure you are deleting the right datasets)
ie.
Code:
//STEP0100 EXEC PGM=ADRDSSU,PARM='TYPRUN=NORUN'
TYPRUN=NORUN - This parameter requests that only data set filtering is to be done if a RESTORE, COMPRESS, COPY, DUMP, or RELEASE operation is requested. If a DEFRAG is requested, then a DEFRAG report is printed but no data sets are actually moved. A full report is produced for a CONVERTV operation but no volumes or data sets are actually converted. This parameter is useful for simulating DFDSS processing to determine what its actual affect will be.
If you still need a programmatic solution you can refer to the following thread
Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
Posted: Mon Mar 19, 2018 4:38 pm Post subject:
Magesh_J wrote:
Hi Kolusu,
Thanks, But I couldn't find a way to delete dataset by volumes.
Regards,
Magesh
Magesh_J,
You can delete the datasets on a particular volume. This will show all the VSAM clusters on the volume XXXXXX. If you want nonvsam datasets then you can simply change the DSORG,EQ,VSAM to DSORG,NE,VSAM
This will give you a list of all the VSAM clusters that haven't been referred to in the last 30 days and you can find the list after the message ADR475I in the SYSPRINT
Once you verified you got the right list of datasets simply remove the TYPRUN parm and re-submit the job
Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
Posted: Tue Mar 20, 2018 11:45 am Post subject:
Magesh_J wrote:
Hi Kolusu,
There are 60 volumes in total, but from storage team, I come to know XYV.YZY.** and XYN.YZV.** belongs to XYZ2* volumes.
I used following code from your solution, and it worked great.
Magesh_J,
Glad you got it working. But shouldn't this be the task of the storage admin? _________________ Kolusu
www.linkedin.com/in/kolusu
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum