Hi
If Subprogram A calls Subprogram B,Can I by somehow get the name of module A inside B without passing module name via parameter.
Thanks
Regards
Sarabjeet Pal
Hi
If Subprogram A calls Subprogram B,Can I by somehow get the name of module A inside B without passing module name via parameter.
Thanks
Regards
Sarabjeet Pal
Not from subprogram to subprogram. Only way is by passing a parameter.
If you are PERFORMing an external subroutine, you have access to the current global data area so you do not have to pass the name all the time, just have a field in the gda with the name.
This cannot be done, however with a CALLNAT. The “callnatee” does not have access to the gda current with the “callnater”.
Perhaps the TECH info can provide that ?
Names, types and levels of the currently active Natural object and all objects on higher levels, as well as the line numbers of the statements invoking the subordinate objects (Mainframes, UNIX and OpenVMS only).
Try to have a look at USR2026N
Finn
We use USR0600N to retrieve the chain of modules.
DEFINE DATA LOCAL
1 #CHAIN (A8/20)
1 #LEVEL (P3/20)
END-DEFINE
*
CALLNAT 'USR0600N' #CHAIN (*) #LEVEL (*)