View previous topic :: View next topic
|
Author |
Message |
harry143
New User
Joined: 05 Nov 2007 Posts: 21 Location: hyd
|
|
|
|
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 |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
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 |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
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 |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
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 |
|
|
harry143
New User
Joined: 05 Nov 2007 Posts: 21 Location: hyd
|
|
|
|
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 |
|
|
harry143
New User
Joined: 05 Nov 2007 Posts: 21 Location: hyd
|
|
|
|
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 |
|
|
harry143
New User
Joined: 05 Nov 2007 Posts: 21 Location: hyd
|
|
|
|
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 |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
If you ask me, wouldn't it be easier to just change the DISP parameters in the JCL |
|
Back to top |
|
|
|