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

deletion of datasets that are already catalogued


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
harry143

New User


Joined: 05 Nov 2007
Posts: 21
Location: hyd

PostPosted: Tue Nov 06, 2007 5:48 pm
Reply with quote

Hi,

Can anybody tell me how to capture the datasets that are already catalogued in a job in spool using rexx
I want to delete all the datasets catalogued by developing a rexx tool.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Tue Nov 06, 2007 9:13 pm
Reply with quote

Do you mean that you want to check the job listing:
Code:
IEF142I XXXSCAN STEP01B - STEP WAS EXECUTED - COND CODE 0000         
IEF285I   XXXSCAN.JOB34569.D0000134.?                  SYSOUT         
IEF285I   PROJ.SPF.RESULT                              CATALOGED     
IEF285I   VOL SER NOS= XXXXXX.                                       
IEF285I   PROJ.SPF.LOAD                                KEPT 
IEF285I   VOL SER NOS= XXXXXX.                               

and delete the new file(s) only (in the example, PROJ.SPF.RESULT) ??
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Tue Nov 06, 2007 11:39 pm
Reply with quote

Harry,

Quote:
I want to delete all the datasets catalogued by developing a rexx tool.


You can use batch SDSF/REXX to get and delete the catalogued datasets.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Tue Nov 06, 2007 11:46 pm
Reply with quote

Harry,

All datasets that are catalogued by a job will have CATLG specified as the DISP position say DISP=(,CATLG,CATLG).

You can code in REXX to find out the datasets with CATLG (By reading the JCL into a stem) as one of the parameter and then delete it. By following this you dont have to access the spool instead you can get it by reading the lines in the JCL.

We once had a similar kind of requirement.
Back to top
View user's profile Send private message
harry143

New User


Joined: 05 Nov 2007
Posts: 21
Location: hyd

PostPosted: Wed Nov 07, 2007 10:31 am
Reply with quote

Aaru wrote:
Harry,

All datasets that are catalogued by a job will have CATLG specified as the DISP position say DISP=(,CATLG,CATLG).

You can code in REXX to find out the datasets with CATLG (By reading the JCL into a stem) as one of the parameter and then delete it. By following this you dont have to access the spool instead you can get it by reading the lines in the JCL.

We once had a similar kind of requirement.


How to read all the lines in a jcl to a stem And the DISP paramenter may have different values also other than mentioned in the above.
How exactly we can capture them
Back to top
View user's profile Send private message
harry143

New User


Joined: 05 Nov 2007
Posts: 21
Location: hyd

PostPosted: Wed Nov 07, 2007 10:31 am
Reply with quote

Marso wrote:
Do you mean that you want to check the job listing:
Code:
IEF142I XXXSCAN STEP01B - STEP WAS EXECUTED - COND CODE 0000         
IEF285I   XXXSCAN.JOB34569.D0000134.?                  SYSOUT         
IEF285I   PROJ.SPF.RESULT                              CATALOGED     
IEF285I   VOL SER NOS= XXXXXX.                                       
IEF285I   PROJ.SPF.LOAD                                KEPT 
IEF285I   VOL SER NOS= XXXXXX.                               

and delete the new file(s) only (in the example, PROJ.SPF.RESULT) ??


Yes Marso, do u have any suggestion ??
Back to top
View user's profile Send private message
harry143

New User


Joined: 05 Nov 2007
Posts: 21
Location: hyd

PostPosted: Wed Nov 07, 2007 10:34 am
Reply with quote

Aaru wrote:
Harry,

Quote:
I want to delete all the datasets catalogued by developing a rexx tool.


You can use batch SDSF/REXX to get and delete the catalogued datasets.


Do u have any jcl for that using rexx??
If yes, can u provide me
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Wed Nov 07, 2007 12:01 pm
Reply with quote

harry,

Quote:
How to read all the lines in a jcl to a stem


start reading REXX manuals.

Quote:
And the DISP paramenter may have different values also other than mentioned in the above.
How exactly we can capture them


The logic should be coded in such a way that the files that are catalogued are picked.

Quote:
Do u have any jcl for that using rexx??


Search the forum for "SDSF" for working JCL's.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Wed Nov 07, 2007 11:41 pm
Reply with quote

If you ask me, wouldn't it be easier to just change the DISP parameters in the JCL
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Merging 2 datasets into one DFSORT/ICETOOL 1
No new posts PL/I, VB Datasets and the RDW PL/I & Assembler 4
No new posts how to get list of all VSAM/non-VSAM ... JCL & VSAM 13
No new posts define 1 DCB parms for multiple outpu... JCL & VSAM 9
No new posts FTP datasets to server CLIST & REXX 13
Search our Forums:

Back to Top