Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Knowing the PROGRAM or MEMBER name being compiled/running 1

Status
Not open for further replies.

CraigJConrad

IS-IT--Management
May 21, 2000
66
US
Is there a way, either at compile time, or at run time, to determine the Program Name and/or the source member name compiled?

I'd like to be able to display this information on the SYSOUT.

Thanks, Craig
 
Thanks for the quick response. Host (390) MVS Cobol -- I really don't know the specific compiler, but it seems to have had all the "latest" features I've tried up to this point.

Is that what you need?

Thanks, Craig
 
The "easiest" way to do this today, is simply code in a "constant" in your WS at compile-time (and "manually" put the name from Program-Id there).

If you want truly generic methods (on MVS), you really need to (currently) chase internal control blocks (not all that difficult - but also not that wonderful).

If your site belongs to SHARE (IBM User Group), you might be interested in the following SHARE Requirement:

"SSLNGC0313587 - New LE Callable Service to get (various) Program Names

A new LE callable service (with capabilities well beyond CEE3GRN) should be created to obtain various program names. This should include options to obtain:

- The currently executing program's name
- The name of the program that "activated" (Called, Invoked, whatever) the currently executing program
- The name of the program at the "top" of the current LE "enclave"
- The name of the program at the "top" of the current LE "thread"

For each of these, sub-options may be required to provide information such as
- Any "alias" by with the program was entered
- Any "long-name" (with mixed characters) as supported by the Binder
- Any Entry-point name when other than the modules name

Finally, although not necessarily a part of this callable service, it would also be desirable to be able to obtain the "data set name" (HFS, PDS, PDSE, LPA member, or whatever) from which each of these entities was obtained."

If you work for a "large shop" and know your (COBOL) systems programmer who has contact with your local IBM branch office, you can submit a "REQUEST" via your branch and reference this SHARE requirement - indicating that it is important to your company.



Bill Klein
 
Bill,

I apologize for not thanking you earlier for your post -- I had lost track of the notification that the thread had been updated. I'm in services, so don't really have a "shop", and by the time Share would influence the product I (and my team) will be long gone. Perhaps when I "need" it again, IBM will have addressed it.

Thanks!! ... Craig
 
Rich,
That will work to get the "main" program's name - but not (necessarily) the currently exectuing program (i.e. a subprogram)

Bill Klein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top