For Programmers: Free Programming Magazines  


Home > Archive > Cobol > June 2006 > user abends and job termination









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author user abends and job termination
michalosada@gmail.com

2006-06-24, 7:55 am

I always thought that after an abend (any abend - including so called
"user") job terminates - following steps are not performed. I have a
job that did something different.

I have a question - does user abend is an ABEND? Does calling ILBOABN0
from COBOL program stops the job?

grateful for any piece of advice
Michael Oa

William M. Klein

2006-06-24, 7:55 am

Whether or not following steps are executed in an (IBM) z/OS environment is
determined by the COND parameter on each step and/or "conditional" IF JCL
statements.

Yes, ILBOABN0 (or CEE3ABD) cause "full" ABEND processing.

HOWEVER, some people get with "return codes". Setting the RETURN-CODE
special register does NOT cause an ABEND, only a non-zero RC.

--
Bill Klein
wmklein <at> ix.netcom.com
<michaloa@gmail.com> wrote in message
news:1150814239.994822.203420@i40g2000cwc.googlegroups.com...
>I always thought that after an abend (any abend - including so called
> "user") job terminates - following steps are not performed. I have a
> job that did something different.
>
> I have a question - does user abend is an ABEND? Does calling ILBOABN0
> from COBOL program stops the job?
>
> grateful for any piece of advice
> Michael Oa
>



Alistair

2006-06-24, 7:55 am


William M. Klein wrote:
> Whether or not following steps are executed in an (IBM) z/OS environment is
> determined by the COND parameter on each step and/or "conditional" IF JCL
> statements.
>
> Yes, ILBOABN0 (or CEE3ABD) cause "full" ABEND processing.
>
> HOWEVER, some people get with "return codes". Setting the RETURN-CODE
> special register does NOT cause an ABEND, only a non-zero RC.
>
> --
> Bill Klein
> wmklein <at> ix.netcom.com


IIRC, you can also check for abending codes and perform your own
processing in zOS JCL

[color=darkred]
> <michaloa@gmail.com> wrote in message
> news:1150814239.994822.203420@i40g2000cwc.googlegroups.com...

Colin Campbell

2006-06-24, 7:55 am

William M. Klein wrote:
> Whether or not following steps are executed in an (IBM) z/OS environment is
> determined by the COND parameter on each step and/or "conditional" IF JCL
> statements.
>
> Yes, ILBOABN0 (or CEE3ABD) cause "full" ABEND processing.
>
> HOWEVER, some people get with "return codes". Setting the RETURN-CODE
> special register does NOT cause an ABEND, only a non-zero RC.
>
>

I'm fuzzy on the details, but I recall that once when we updated the
operating system and probably the compiler, too, the installation
options got changed from what we were used to having. This resulted in
an error condition that always previously had caused an abend to change
to generating an error message and a return code. This may very well be
the option ABTERMENC in Language Environment run time options.

Also, if you specify FILE STATUS items on your files, but do not check
them, or check them incorrectly or incompletely, you may end up not
getting an abend when a problem occurs. Omitting the FILE STATUS item
tells the compiler to send errors to an error handler, which might give
you, for example, a S013-nn abend on an OPEN error. But specifying FILE
STATUS says you want to handle the problem, and then if you don't, you
may end up doing something like trying to execute a READ, and getting a
different abend because the file is not open.
CG

2006-06-24, 7:55 am

michaloa@gmail.com wrote:
> I always thought that after an abend (any abend - including so called
> "user") job terminates - following steps are not performed. I have a
> job that did something different.
>
> I have a question - does user abend is an ABEND? Does calling ILBOABN0
> from COBOL program stops the job?
>
> grateful for any piece of advice
> Michael Oa
>

There are two different situations that can be tested in JCL to
determine if a step should or should not be executed:

1) If you want to check the Condition Code [a.k.a., Return Code] from
an earlier step, use the COND option on the EXEC statement as indicated
in the following from the IBM JCL Reference:

> //STEP6 EXEC PGM=DISKUTIL,COND=(4,GT,STEP3)
>
> In this example, if the return code from STEP3 is 0 through 3, the
> system bypasses STEP6. If the return code is 4 or greater, the
> system executes STEP6. Because neither EVEN nor ONLY is
> specified, the system does not execute this step if a preceding
> step abnormally terminates.

The default, with no COND option, is to execute the step.

2) If you want to check for a previous ABEND, you use COND=EVEN or
COND=ONLY sub-options. Note that, if you specify EVEN or ONLY alone,
the Return/Condition code is not tested from any previous step. Also
from the JCL Reference manual:

> EVEN
> Specifies that this job step is to be executed even if a preceding
> job step abnormally terminated.
>
> ONLY
> Specifies that this job step is to be executed only if a preceding step abnormally terminated.


But, you can use combinations of Return Code values and EVEN or ONLY.
An example:

> //TEST2 EXEC PGM=DUMPINT,COND=((16,GE),(90,LE,STEP1),
ONLY)
>
> The system executes this step ONLY if two conditions are met:
>
> 1. A preceding job step abnormally terminated.
> 2. No return code tests are satisfied.
>
> Therefore, the system executes this step only when all three of
> the following are true:
>
> * A preceding job step abnormally terminated.
> * The return codes from all preceding steps are 17 or greater.
> * The return code from STEP1 is 89 or less.
>
> The system bypasses this step if any one of the following is true:
>
> * All preceding job steps terminated normally.
> * The return code from any preceding step is 0 through 16.
> * The return code from STEP1 is 90 or greater.


Now, with this introduction, you really need to just go RTFM to
understand all the other variations that can be used.

Good luck,
Carl
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com