CALL "C$CALLEDBY" USING CALLING-PROGRAM GIVING CALL-STATUS
|CALLING-PROGRAM PIC X(n)
|Contains the name of the calling program or spaces if no caller exists or if the caller is unknown. The runtime will use as much space for the name or spaces as the COBOL program allows. If the object being called is in an object library, the program returns the PROGRAM-ID. If the object is not in an object library, the disk name is returned.
|CALL-STATUS PIC S99
| This parameter receives one of the following values:
1 - Routine called by another COBOL program