Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
REXX cdoe to purge a JOB from spool after successful Run.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Sulabh Agrawal

New User


Joined: 29 Sep 2016
Posts: 4
Location: India

PostPosted: Thu Mar 09, 2017 11:36 am    Post subject: REXX cdoe to purge a JOB from spool after successful Run.
Reply with quote

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
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Thu Mar 09, 2017 11:59 am    Post subject: Reply to: REXX cdoe to purge a JOB from spool after successful Run.
Reply with quote

Talk to your Scheduler people.
Back to top
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 171
Location: Switzerland

PostPosted: Thu Mar 09, 2017 2:29 pm    Post subject:
Reply with quote

Or look at the REXX SDSF API.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 658
Location: Whitby, ON, Canada

PostPosted: Thu Mar 09, 2017 8:20 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2088
Location: Silicon Valley

PostPosted: Thu Mar 09, 2017 11:09 pm    Post subject: Reply to: REXX cdoe to purge a JOB from spool after successful Run.
Reply with quote

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
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 212
Location: Maryland

PostPosted: Sun Mar 12, 2017 12:40 am    Post subject:
Reply with quote

Willy Jensen wrote:
Or look at the REXX SDSF API.


Also EJES EXECAPI interface could help with this issue.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8187
Location: East Dubuque, Illinois, USA

PostPosted: Sun Mar 12, 2017 7:33 am    Post subject:
Reply with quote

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
View user's profile Send private message
farhad_evan

New User


Joined: 30 Aug 2014
Posts: 24
Location: UK

PostPosted: Tue Mar 14, 2017 9:56 am    Post subject:
Reply with quote

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
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 171
Location: Switzerland

PostPosted: Tue Mar 14, 2017 4:39 pm    Post subject:
Reply with quote

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
View user's profile Send private message
farhad_evan

New User


Joined: 30 Aug 2014
Posts: 24
Location: UK

PostPosted: Tue Mar 14, 2017 5:13 pm    Post subject:
Reply with quote

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
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 212
Location: Maryland

PostPosted: Wed Mar 15, 2017 2:12 am    Post subject:
Reply with quote

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
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 171
Location: Switzerland

PostPosted: Wed Mar 15, 2017 6:02 pm    Post subject:
Reply with quote

JOBDEF and OUTCLASS are JES2 definitions. Probably should have said so.
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
No new posts ISREDIT Macro is not returning back t... nico_neoz CLIST & REXX 4 Sat Nov 18, 2017 7:40 pm
No new posts REXX LISTDSI () SMSINFO is not working upendrasri CLIST & REXX 4 Fri Nov 17, 2017 11:33 am
No new posts Calling IKJEFT01 program from Rexx upendrasri CLIST & REXX 4 Wed Nov 15, 2017 4:27 pm
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us