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

To delete s list of dataset in a PS file using JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
d katkuri

New User


Joined: 27 Feb 2013
Posts: 16
Location: india

PostPosted: Fri Apr 19, 2013 3:46 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Apr 19, 2013 3:49 pm
Reply with quote

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
View user's profile Send private message
d katkuri

New User


Joined: 27 Feb 2013
Posts: 16
Location: india

PostPosted: Fri Apr 19, 2013 4:19 pm
Reply with quote

Hi enrico,
could you please let me know how can i acheive this task.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Apr 19, 2013 4:25 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Apr 19, 2013 4:27 pm
Reply with quote

pretty scaring approach icon_eek.gif
Back to top
View user's profile Send private message
d katkuri

New User


Joined: 27 Feb 2013
Posts: 16
Location: india

PostPosted: Fri Apr 19, 2013 5:54 pm
Reply with quote

what if the dataset isn't in the JCL/PROC libraries
--------------------------------------------------------
Need to delete the dataset .
Back to top
View user's profile Send private message
d katkuri

New User


Joined: 27 Feb 2013
Posts: 16
Location: india

PostPosted: Fri Apr 19, 2013 5:59 pm
Reply with quote

Enrico,
Could you please let me know the approach
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Apr 19, 2013 6:21 pm
Reply with quote

ibmmainframes.com/viewtopic.php?p=310811#310811 icon_confused.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Apr 19, 2013 6:41 pm
Reply with quote

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
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri Apr 19, 2013 8:18 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Apr 19, 2013 9:10 pm
Reply with quote

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
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Mon Apr 22, 2013 7:23 pm
Reply with quote

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
View user's profile Send private message
d katkuri

New User


Joined: 27 Feb 2013
Posts: 16
Location: india

PostPosted: Tue Apr 23, 2013 2:17 pm
Reply with quote

yes goodman !!

We can do it by using sort/rexx . Could yo u help me ?
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Apr 23, 2013 2:24 pm
Reply with quote

And how about dataset names resolved by substitution of symbolic parameters?

And what has development to do with production data ?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Apr 23, 2013 2:25 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Apr 23, 2013 2:39 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Apr 23, 2013 2:51 pm
Reply with quote

Robert, that's what I've been trying to tell him from the off icon_cry.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Apr 23, 2013 2:53 pm
Reply with quote

and the TS keeps pestering ,
just started a new topic asking for a REXX solution now
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Apr 23, 2013 3:04 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Apr 23, 2013 8:21 pm
Reply with quote

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
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 Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts DELETE SPUFI DB2 1
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top