This topic has been discussed several times, Here is one of the PREVIOUS POSTS that you can look at. If this does not answer you question, please come back.
Hi Dave, your link is useful. But the requirement here is to identify the program which has invoked the particular sub program.
Usually the informations of the programs which invoke a program will be available in the maintenance log or what ever you call it. Mostly through this we can identify what are the programs which can invoke a program. Other than this, i think only in runtime or after a successful or unsuccessful run, we can identify what program has invoked.
Called program Consists of:
1. Linkage section - to pass the value from the calling pgm to called pgm and called pgm to calling pgm.
2. Called pgm contains EXIT PROGRAM as the last sentence.
Calling pgm consists of:
1. Uses name of the called pgm in procedure division. the name is the progrm name defined in PROGRAM-ID.
ex: PROCEDURE DIVISION.
CALL 'ABC' USING identifier1, identifier2...