Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: To delete s list of dataset in a PS file using JCL
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Apr 19, 2013 3:49 pm    Post subject: Reply to: To delete s list of dataset in a PS file using JCL
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Apr 19, 2013 4:25 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Apr 19, 2013 4:27 pm    Post subject: Reply to: To delete s list of dataset in a PS file using JCL
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    Post subject:
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    Post subject:
Reply with quote

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

Senior Member


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

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

http://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: 8593
Location: Back in jolly old England

PostPosted: Fri Apr 19, 2013 6:41 pm    Post subject:
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: 1738
Location: Bloomington, IL

PostPosted: Fri Apr 19, 2013 8:18 pm    Post subject: Re: To delete s list of dataset in a PS file using JCL
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

Site Director


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

PostPosted: Fri Apr 19, 2013 9:10 pm    Post subject:
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    Post subject:
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    Post subject:
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Apr 23, 2013 2:24 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Apr 23, 2013 2:25 pm    Post subject: Reply to: To delete s list of dataset in a PS file using JCL
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: 7913
Location: Bellevue, IA

PostPosted: Tue Apr 23, 2013 2:39 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Apr 23, 2013 2:51 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Apr 23, 2013 2:53 pm    Post subject: Reply to: To delete s list of dataset in a PS file using JCL
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Apr 23, 2013 3:04 pm    Post subject: Reply to: To delete s list of dataset in a PS file using JCL
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

Site Director


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

PostPosted: Tue Apr 23, 2013 8:21 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us