C$WRU
The C$WRU library routine returns the name of the program that has called the currently running program.
Syntax:
 CALL "C$WRU" USING programName,
                    programLine, programIntraLine.
Parameters:
programName
PIC X(n)
Receives the name of the calling program.
If this routine is called by the main program, "RUNCOBOL" is returned.
programLine
PIC 9(n)
Receives 0.
programIntraLine
PIC 9(n)
Receives 0.
Examples:
Example - Retrieve the name of the calling program
*> define calling-program as pic x(n)
*> define foo-1 and foo-2 as pic 9
 
call "c$wru" using calling-program, foo-1, foo-2.