Tony Summers writes
Anybody know of a way to get a cobol's program-Id "into" the procedure
division ?
eg. Something like ....
IDENTIFICATION DIVISION.
PROGRAM-ID. PRABCD.
WORKING-STORAGE SECTION.
1 WORK-TEMP PIC X(20).
PROCEDURE DIVISION.
MDEXAA-MASTER SECTION.
*
MOVE PROGRAM-ID TO WORK-TEMP.
DISPLAY WORK-TEMP
-------------------------------------------------------------
Well if you really want to get it in a round about way do the following.
1. CALL INTRINSIC "PROCINFO"
with pin = 0 (yourself) and item 10 to return the name of the
running program.
2. COPY running program to another file name. If program is running can't
run LINKEDIT
3. FILE discfilename;DEV=DISC;TEMP;NOCCTL;REC=-80,,F,ASCII;DISC=10000
4. LINKEDIT "LISTPROG copied filename" >*discfilename
5. Read discfilename looking for "pri_p". If found program id in first
columns.
Mike Berkowitz
Guess? Inc.
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *