Page 1 of 1

Execute every step even if there is an abend?

Posted: Wed Jul 19, 2017 12:47 pm
by Dino
I need to run a job which creates catalog entries to file, gdg, generation files. All the steps to execute even if error or abend, any return code.

What Cond parameter I need to use and where I have to use.?

[ Post made via Android ] Image

Re: Execute every step even if there is an abend?

Posted: Wed Jul 19, 2017 4:52 pm
by Robert Sample
Why do you need more than one step? And what abends are you anticipating that you "have" to handle? If an operator cancels your job, you'll get an S222 (most likely) abend that prevents any further execution -- no matter what you have coded in your JCL. So from that sense, you CANNOT have your code execute every step even with abends since some abends stop processing of the job immediately. And what have you tried so far and how do the results you're getting not meet your needs?

A terminology note: z/OS has files on tape and in Unix System Services. Everything else is a data set.

Re: Execute every step even if there is an abend?

Posted: Wed Jul 19, 2017 7:48 pm
by Dino
I have used COND=EVEN on JOb card but it did not work.

Re: Execute every step even if there is an abend?

Posted: Wed Jul 19, 2017 8:26 pm
by Akatsukami
Unsurprising, as the fine manual indicates that EVEN and ONLY are not available to the COND parameter on the JOB statement, but only on the EXEC statement.

Re: Execute every step even if there is an abend?

Posted: Fri Jul 21, 2017 11:52 am
by nicc
You have failed to answer Robert's query as to why you need separate steps. You have not even specified how you are doing this task. If you are doing it using IDCAMS then you only need one step. As the last IDCAMS command you can code SET MAXCC=0 - or whateveer the syntax is. That will return a zero return code to your job.