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
 

 

REXX/CLIST code to delete all PS in a JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: REXX/CLIST code to delete all PS in a JCL
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

Site Director


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

PostPosted: Fri Feb 27, 2009 11:24 am    Post subject:
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    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Feb 27, 2009 12:27 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Fri Feb 27, 2009 9:43 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Sat Feb 28, 2009 2:48 pm    Post subject:
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    Post subject: //STEP001 EXEC CA11RMS, TYPRUN=F
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: 2433
Location: Netherlands, Amstelveen

PostPosted: Tue Dec 29, 2009 5:18 pm    Post subject:
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: 401
Location: Mumbai

PostPosted: Tue Dec 29, 2009 9:29 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am


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