View previous topic :: View next topic
|
Author |
Message |
Sulabh Agrawal
New User
Joined: 29 Sep 2016 Posts: 4 Location: India
|
|
|
|
Hi Group,....
I have requirement to check the SPOOL for a given JOB and purge it if the RC is 0.
I am planning to automate the above process using REXX.
If any of you aware about the approach and code for my requirement, please let me know, I would be greately thankful!!!
Regards
Sulabh |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Talk to your Scheduler people. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 734 Location: Denmark
|
|
|
|
Or look at the REXX SDSF API. |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
I can see a use for a tool like this in a Development environment but NOT in Production!
I already have a tool that we use (in Development only!) to archive job output to a PDS or PDSE using the REXX/SDSF interface. It also creates a log data set that can be used as input to another tool that purges the output.
If you are on z/OS 2.2 you can take advantage of the new RGEN command under SDSF. It generates skeleton Rexx/SDSF programs based on the SDSF screen you run it on. I have not yet had an opportunity to try it out because we just recently upgraded to 2.2 and the feature hasn't been turned on yet, but it looks very interesting. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
My site has a program called JOBPURGR (sorry, source is not available) which you would add as the last step of the job. And you would add JCL so that the last step only gets executed if RC=0.
The JOBPURGR program uses control blocks to determine the job number and issues a $PJxxxx operator command (or something like that). |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2140 Location: USA
|
|
|
|
Willy Jensen wrote: |
Or look at the REXX SDSF API. |
Also EJES EXECAPI interface could help with this issue. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
Also EJES EXECAPI interface could help with this issue. |
IF the site has (E)JES -- as a vendor product, (E)JES is not installed at every site, so your suggestion has a good chance of being unusable. |
|
Back to top |
|
|
farhad_evan
New User
Joined: 30 Aug 2014 Posts: 24 Location: UK
|
|
|
|
i think you can use of appropriate JOB CLASS in your job. ( with DISP (PURGE,HOLD) )
in that case you don't need REXX or anything |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 734 Location: Denmark
|
|
|
|
Not JOBDEF, but OUTCLASS .. OUTDISP(PURGE,HOLD) might work. Though you must make sure the job abends for anything but RC=0, as OUTDISP is based on job abend:
OUTDisp=([normal][,abnormal])
normal Specifies the output disposition if the job does not abend.
abnormal Specifies the output disposition if the job abends[/quote] |
|
Back to top |
|
|
farhad_evan
New User
Joined: 30 Aug 2014 Posts: 24 Location: UK
|
|
|
|
Quote: |
i think you can use of appropriate JOB CLASS in your job |
on SDSF you can run this command to find out disposition of job's out put:
Code: |
$D JOBCLASS(*),OUTDISP |
and find the job class with DISP (PURGE,HOLD) and in your JCL set MSGCLASS to it. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2140 Location: USA
|
|
|
|
Robert Sample wrote: |
IF the site has (E)JES -- as a vendor product, (E)JES is not installed at every site, so your suggestion has a good chance of being unusable. |
Agree.
As well as many other recommendations from this forum do refer to the tools not available in our environment. But I do not post objections on each of them. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 734 Location: Denmark
|
|
|
|
JOBDEF and OUTCLASS are JES2 definitions. Probably should have said so. |
|
Back to top |
|
|
|