On Thu, Feb 27, 2014 at 4:26 PM, Pommier, Rex <[email protected]>wrote:
<snip>

> John,
>
> I slightly disagree with one point you made.  I don't feel that in this
> example that the RETURN-CODE is being changed "behind the scenes".  It's
> being changed in the wide open.  The code snippet is setting the
> RETURN-CODE then calling another program.  That's about as "in the open" as
> I can think of.
>

I guess what I meant by "behind the scenes", I was really meaning that
RETURN-CODE, which most think of as a variable, can be modified without
being explicitly mentioned in the source code.


>
>
>
> Now an ignorance question from me - if I have a COBOL/CICS program and do
> an "EXEC CICS do something", will the RETURN-CODE variable get set by this
> program call or would CICS just return a code in the COMMAREA (or elsewhere
> besides RETURN-CODE)?
>

The EXEC CICS does a CALL. And it does result in RETURN-CODE being set.
What is bad is that the return value is non-deterministic. It is _not_ the
result of the EXEC CICS command. Upon return from the interface program,
R15 (and thus RETURN-CODE) contains the entry point address of the
interface stub routine.


>
> Rex
>
>
>


-- 
Wasn't there something about a PASCAL programmer knowing the value of
everything and the Wirth of nothing?

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to