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

REXX/CLIST code to delete all PS in a JCL


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nirmal.poikaikumaran

New User


Joined: 29 Nov 2005
Posts: 66
Location: Bangalore

PostPosted: Fri Feb 27, 2009 11:08 am
Reply with quote

Hi

I am new to Rexx & CLIST. I want to know how to write a piece of code which can help in the below

Problem:

Time and then I run JCL's which has 100 steps generating 100 PS files which needs to be validated manually. After the validation I again have to rerun the JCL. But I am forced to delete the data sets for the new run?(renaming is what i do normally.. but then again lot of unnecessary data sets are created).

Is there any simple CLIST or Rexx code which I can execute on command prompt to delete all the unnecessary data sets ?

Nirmal
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 Feb 27, 2009 11:24 am
Reply with quote

Hello,

One way to do what you want is to set up some jcl and put it in a pds that will unconditionally delete all of the datasets prior to the beginning of a run. Run this as the first step of your 100 step job or as a small job that is submitted before the "real" job.
Back to top
View user's profile Send private message
nirmal.poikaikumaran

New User


Joined: 29 Nov 2005
Posts: 66
Location: Bangalore

PostPosted: Fri Feb 27, 2009 11:31 am
Reply with quote

Hi Dick

You mean the UCC7 RMS command to delete? Or how do I accomplish that?

Please help on this

Thanks
Nirmal
Back to top
View user's profile Send private message
vpalanivelu

New User


Joined: 24 Feb 2009
Posts: 14
Location: chennai

PostPosted: Fri Feb 27, 2009 11:46 am
Reply with quote

you can try the following CA11RMS code to delete the datasets.
Code:


//TSOXXXX4 JOB (12345),'JCL',CLASS=E,   
//           MSGCLASS=X,NOTIFY=&SYSUID,
//           MSGLEVEL=(1,1)             
//*                                     
//R000 EXEC CA11RMS,TYPRUN='F'   
     
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri Feb 27, 2009 12:27 pm
Reply with quote

vpalanivelu wrote:
you can try the following CA11RMS code to delete the datasets.
Code:

//TSOXXXX4 JOB (12345),'JCL',CLASS=E,   
//           MSGCLASS=X,NOTIFY=&SYSUID,
//           MSGLEVEL=(1,1)             
//*                                     
//R000 EXEC CA11RMS,TYPRUN='F'   

And if the OP does not have CA7 / CA11 installed.

Please refrain from giving product dependent solutions unless the OP has categorically stated that the product is installed.

As for a REXX solution - Click HERE to see a similar topic.
Back to top
View user's profile Send private message
nirmal.poikaikumaran

New User


Joined: 29 Nov 2005
Posts: 66
Location: Bangalore

PostPosted: Fri Feb 27, 2009 2:17 pm
Reply with quote

Well the Jcl did not work because the program was not found

R000 EXEC CA11RMS,TYPRUN='F'
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 Feb 27, 2009 9:43 pm
Reply with quote

Hello,

Quote:
You mean the UCC7 RMS command to delete? Or how do I accomplish that?
No, i wasn't thinking of ucc7/rms. I was thinking of some simple jcl of your own that would delete all of the files before the actual run started.

2 common ways to do this are:
A set of dd statements with (mod,delete) for each dataset.
or
Using idcams.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Sat Feb 28, 2009 2:48 pm
Reply with quote

And as posted earlier - if you follow the link all will be exolained
Back to top
View user's profile Send private message
mambopras

New User


Joined: 11 Nov 2008
Posts: 52
Location: Hyderabad

PostPosted: Tue Dec 29, 2009 5:15 pm
Reply with quote

Hi,
I am not sure about what is the individual usage of CA11RMS and TYPRUN=F, can someone clarify it? Thanks a lot!

Reagrds,
Prashanth
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


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

PostPosted: Tue Dec 29, 2009 5:18 pm
Reply with quote

expat wrote:
And as posted earlier - if you follow the link all will be exolained


Oops, even you are being ignored. icon_eek.gif
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Tue Dec 29, 2009 9:29 pm
Reply with quote

if your data set names match a specific pattern, such as USERID.XYZ.ABC.FILE1, USERID.XYZ.ABC.FILE2, etc, then a single DELETE command from TSO or IDCAMS will do it: TSO DEL 'USERID.XYZ.ABC.*'

That is the easiest way but you have to follow naming conventions and be sure no other data sets you want to keep meet that pattern. See the DELETE command. (no rexx required)
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts DELETE SPUFI DB2 1
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
Search our Forums:

Back to Top