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

purge jobs with return code 0 and retain jobs with RC>0


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
me.batenipour

New User


Joined: 15 Dec 2024
Posts: 3
Location: Iran

PostPosted: Tue Dec 24, 2024 11:38 am
Reply with quote

Hi,
How can I write a JCL that purges the job if it returns RC=0 and does not purge it if RC>0?

Thanks
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1337
Location: Bamberg, Germany

PostPosted: Tue Dec 24, 2024 1:56 pm
Reply with quote

Have a look at JES OUTPUT OUTDISP parameters. It works Ok when you let ABEND the successful jobs. So a two step solution should do your task.

PS: I tried it just now, and it's fine for me.
Back to top
View user's profile Send private message
me.batenipour

New User


Joined: 15 Dec 2024
Posts: 3
Location: Iran

PostPosted: Tue Dec 24, 2024 2:34 pm
Reply with quote

Thank you, but that’s not what I meant. I want the job to be completely purged if RC=0; otherwise, it should remain in JES.
We do this by MSGCLASS but it purges both RC=0 and RC>0 jobs
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1337
Location: Bamberg, Germany

PostPosted: Tue Dec 24, 2024 2:39 pm
Reply with quote

Check what I have written, it's independent of the MSGCLASS parameter you have set.
Back to top
View user's profile Send private message
me.batenipour

New User


Joined: 15 Dec 2024
Posts: 3
Location: Iran

PostPosted: Tue Dec 24, 2024 2:48 pm
Reply with quote

Can you give me a small jcl example?
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to turn off 'ACTION' SDSF output ... TSO/ISPF 2
No new posts Finding and researching jobs All Other Mainframe Topics 0
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
Search our Forums:

Back to Top