2009/9/15 Michael Klaeschen <[email protected]>

> from my reading of the MVS JCL Reference, there is no abend-disposition
> available, neither for the DISP nor for the PATHDISP parameter. Instead,
> one may code an abnormal termination disposition. But as the introduction
> to the DISP parameter reads, the behaviour in case of an abend relies on
> ESTAE or ESPIE processing. And so even after an abend occurs, the normal
> termination disposition may be choosen.
>

Sorry for the misleading naming, I meant the abnormal-termination-disp -
which is used when a program produces an abnormal end.


Forcing an abend from a program is easily achieved by calling the ABEND
> macro. Not so easy to achieve is the correct ESTAE coding. I think, this
> is very similar to what is known as exception handling in Java, like "try
> ... catch" constructions in the Java source. And therefore as usual it
> really depends on a programmer's skill if it is a tidy or dirty
> implementation.
>
However, I still do not see what this has to do with disposition in your
> JCL. When you want to run certain steps for rolling back GDG etc.
> depending on the condition codes of a previously run Java program....why
> not just doing so as usual with COND parameter, IF THEN ELSE or in OPC/TWS
> application logic?
>

To explain the situation a little more in detail:

Our development staff is going to develop new programs in Java instead of
COBOL.

All the old COBOL programs are designed in a way that if there's any reason
to not continue the program and the rest of the job and perhaps cleanup some
files etc. they don't return a RC != 0, but they force the program to abend
- because then they can use the abnormal-termination-disp to do the cleanup
for them without evaluating the RC using COND, IF/THEN/ELSE.
That's the way our operating likes to work, they don't want to evaluate the
RC but easily use the abnormal-termination-disp if there's any reason to
cleanup etc..

I don't see any problem using the ABEND macro in general if the program
requires it, there may be states during the execution when it's necessary -
but I think in general the program should return an RC which should be
evaluated as described above.

In addition, and that's when I was asked to find a solution, Java is not
designed to abend. I'm not aware of using assembler macros within Java.
However, as described before, you can use JNI to include COBOL or other
objects which then can force the abend, but I think that's a dirty practice.

I think the correct way is to return an RC whenever possible and to evaluate
it within the JCL using COND, IF/THEN/ELSE. Our operating otherwise want's
to continue using their approach by just relying on the
abnormal-termination-disp.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to