I have a CL program, I'll call CLPG2. It is sometimes called from CL program CLPG1. Other times it is called straight from the command line. How can I tell, short of passing a parameter, if the program is being called from another program or it is being run by itself. That is how can I tell where in the invocation stack it is?
Announcement
Collapse
No announcement yet.
Where is this called from
Collapse
X
-
Re: Where is this called from
Lokk at Birgitta's post here: https://www.ibm.com/developerworks/c...e-6bd68844175dRegards
Kit
http://www.ecofitonline.com
DeskfIT - ChangefIT - XrefIT
___________________________________
There are only 3 kinds of people -
Those that can count and those that can't.
Comment
-
Re: Where is this called from
This is a program that displays the calling message q a popup screen.. This is not the screen or anything. Just shows an example on how to do it.
D QUILNGTX PR ExtPgm('QUILNGTX')
D text 65535a const options(*varsize)
D length 10i 0 const
D msgid 7a const
D qualmsgf 20a const
D errorCode 32767a options(*varsize)
D QUSRJOBI PR ExtPgm('QUSRJOBI')
D rcvVar 65535a options(*varsize)
D rcvVarLen 10i 0 const
D format 8a const
D qualJob 26a const
D intJob 16a const
D errorCode 32767a options(*varsize:*nopass)
D kaboom ds
D 10i 0 inz(0)
D 10i 0 inz(0)
/free
QUILNGTX(msg: %len(msg): ' ': ' ': kaboom);
QUSRJOBI(JOBI0600: %size(JOBI0600): 'JOBI0600': '*': *blanks);
if JOBI0600.F12;
return 'F12';
else;
return 'ENT';
endif;
/end-free
Comment
Comment