On 4/6/2012 7:23 PM, Ken Brick wrote:
many years ago I needed to know, in DOS/VS, whether an assembler
routine was called from a PL/I or assembler module. I put in a
test to see if in DOS terms the weak extrn PLIMAIN was not 0.
Non zero meant a PL/I module was present.

This works for special cases, but not in general. For instance, consider a PL/I program calling ASM calling CoBOL calling ASM. The second ASM would incorrectly conclude it was called from PL/I.

I ran into an analog of this trying to determine whether a program is running under TSO - presence of TSO control blocks does not indicate that the immediate caller was the TMP. IBM, for whatever reason, disallowed multiple TMP invocation in MVS (or perhaps SVS?), so these days one can just rely on the result from EXTRACT.

Gerhard Postpischil
Bradford, VT

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN

Reply via email to