View previous topic :: View next topic
|
Author |
Message |
d katkuri
New User
Joined: 27 Feb 2013 Posts: 16 Location: india
|
|
|
|
JCL Requirement:
--------------------
From development team on a weekly basis I will recieve a PS file which contains list of datasets - .
PS File:
ABC.DATASET1
ABC.DATASET2
I need to read all the datasets from a PS file and to search in production JCL/PROC lib. If the dataset is not there in the JCL/PROC Lib then I need to delete the dataset from the system catalg.
Please provide a sample code with JCL |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
Please provide a sample code with JCL |
only after You have provided the proper fee
current fees are around 150€ per hour ( VAT excluded ) plus expenses ( VAT exempt ) |
|
Back to top |
|
|
d katkuri
New User
Joined: 27 Feb 2013 Posts: 16 Location: india
|
|
|
|
Hi enrico,
could you please let me know how can i acheive this task. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
So what if the dataset isn't in the JCL/PROC libraries
Correct storage management techniques should deal with the situation without such meanderings through libraries |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
pretty scaring approach |
|
Back to top |
|
|
d katkuri
New User
Joined: 27 Feb 2013 Posts: 16 Location: india
|
|
|
|
what if the dataset isn't in the JCL/PROC libraries
--------------------------------------------------------
Need to delete the dataset . |
|
Back to top |
|
|
d katkuri
New User
Joined: 27 Feb 2013 Posts: 16 Location: india
|
|
|
|
Enrico,
Could you please let me know the approach |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
d katkuri wrote: |
what if the dataset isn't in the JCL/PROC libraries
--------------------------------------------------------
Need to delete the dataset . |
Why do you need to delete it.
If your storage management team have done their job correctly there will never be a need to delete datasets manually like this. They will expire naturally in accordance with the policies in place as defined in the ACS routines. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
d katkuri wrote: |
JCL Requirement:
--------------------
From development team on a weekly basis I will recieve a PS file which contains list of datasets - .
PS File:
ABC.DATASET1
ABC.DATASET2
I need to read all the datasets from a PS file and to search in production JCL/PROC lib. If the dataset is not there in the JCL/PROC Lib then I need to delete the dataset from the system catalg.
Please provide a sample code with JCL |
As your system programmers evidently lack the competence to manage your machine properly, you may want to look at this thread on our sister board. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forum,
Just my $.02 . . .
When datasets are newly created, there should be published purge criteria.
This should determine deletion of datasets raher than whether some dsn in in "the jcl" anywhere.
If the intent is to proceed this way, suggest you backup the "discovered" files before deletion . . . Just in case. |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
Wait wait wait.
Am I reading that wrong? You get a listing of cataloged datasets. Then you want to search through the JCL/PROC libraries to see if those datasets are REFERENCED by the JCL/PROC?
If you don't find any reference, then you want to remove the dataset?
Did I get the requirement correct? |
|
Back to top |
|
|
d katkuri
New User
Joined: 27 Feb 2013 Posts: 16 Location: india
|
|
|
|
yes goodman !!
We can do it by using sort/rexx . Could yo u help me ? |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
And how about dataset names resolved by substitution of symbolic parameters?
And what has development to do with production data ? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
We can do it by using sort/rexx . Could yo u help me ? |
please be more detailed about the help You need ! |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Personally, I think your entire premise is flawed. A data set could be allocated dynamically, in which case you would NEVER see a DD name referencing the data set yet it could be used every day of the year. And then your code deletes this data set ....
A more robust approach would be to work out HSM migration rules for data sets such that data sets that have not been used in X days get moved to level 1; if not used in another Y days they get moved to level 2; if not used in Z days then HSM deletes them. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Robert, that's what I've been trying to tell him from the off |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
and the TS keeps pestering ,
just started a new topic asking for a REXX solution now |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
if the TS instead of pestering had simply googled for REXX ISRSUPC
he would have already found a working solution ,
not exactly the same, but close enough
the solution I found just searches for a single string
not difficult to write a wrapper to read the <string> list and ... ... ... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If you intend to actually implement this, you need to make sure you have direction (in writing from management) that all of these datasets not in the jcl/proc libraries are to be deleted.
If you just do this "on your own" and something needed is deleted, there may be consequences . . . |
|
Back to top |
|
|
|