Page 1 of 1

Execute Job Step after JCL error...

PostPosted: Fri Mar 18, 2011 9:02 pm
by fanman7
Hello,
I'm in a position where I need to execute a job step even after a JCL error. Without getting into too much detail, I've already tried using the COND=EVEN condition on the step however when a previous step abends with a JCL error (more specifically trying to allocate more space than is available) the job just ends with a JCL error. Is there a way to get around this?
Thanks!

Re: Execute Job Step after JCL error...

PostPosted: Fri Mar 18, 2011 9:07 pm
by BillyBoyo
We like detail. Usually the only way to know what the problem is.

Re: Execute Job Step after JCL error...

PostPosted: Fri Mar 18, 2011 9:11 pm
by MrSpock
No.

Re: Execute Job Step after JCL error...

PostPosted: Fri Mar 18, 2011 9:16 pm
by BillyBoyo
Why do you want to? If you have jobsteps which aren't dependent on successful completion of an earlier step, can they go into JOB(s) of their own? COND will only deal with Condition Codes, won't it? An abend is a different thing.

Re: Execute Job Step after JCL error...

PostPosted: Fri Mar 18, 2011 9:32 pm
by MrSpock
A JCL error causes the job to be flushed. Period. The bigger issue here is that something like this should never (or extremely rarely) happen. If the SMS rountines can't find enough free storage at that run time, then there are some production control fixes that need to be looked into.

Re: Execute Job Step after JCL error...

PostPosted: Fri Mar 18, 2011 9:35 pm
by fanman7
I guess I shouldn't use that "Quick Reply" button grrrrrr.....

Anyway here is more detail..
I'm working with JCL that calls a master PROC that calls a series of sub PROCs.
The last PROC step in the master proc, runs a program that we call "Component Response" which basically passes a status through MQ to USS box and picked up by a JAVA component for further processing.
This status is either populated by an exit within the COBOL program or condition codes of the previous PROC steps.
This works very well, until one day DASD resources were low and our primary allocation for an output file could not be accomodated, resulting in a JCL error, which stopped the job right there, which of course is normal.
However the monitoring system never got any feedback from our "Component Response" program so the problem took a long time to track down (so says the user).
Anyway, I've tried using the COND=EVEN construct to alleviate this problem. To do this I moved the "Component Response" statements out of the master PROC into it's own PROC and called it from both the master PROC and the JCL with COND=EVEN while duplicating the space issue and in both cases the "Component Response" steps would not trigger.
I am beginning to think that there is no way around this.

Thanks for listening.

Re: Execute Job Step after JCL error...

PostPosted: Fri Mar 18, 2011 9:38 pm
by fanman7
I would add that a JCL error such as an incorrect LRECL for an output file does not cause a hard stop of the jobstream and a condition code is captured and returned through the "Component Response" program.

Re: Execute Job Step after JCL error...

PostPosted: Fri Mar 18, 2011 9:44 pm
by BillyBoyo
There is the NOTIFY for the job statement, works whether job abends, has conds or completes normally. How it would help, I can't answer. Are you using a scheduler package of any sort? Look at the docs, talk to whoever "owns" it. In the back of my mind there is something in the JES3 (don't know what you are using) statements that can do some sort of conditional possibility for release of another job for an abend. For the life of me, can't remember any more. Might just be a fantasy of mine.

Re: Execute Job Step after JCL error...

PostPosted: Fri Mar 18, 2011 9:54 pm
by BillyBoyo
When you say "JCL error", you're not saying that it is syntactically invalid and JESx just tosses it out? When you didn't have space you're getting some Sx37-type abend? When your LRECL was wrong, was something trapping it and turning it into a return code/condition code?