The INQUIRE_CURRENT_PROGRAM call

INQUIRE_CURRENT_PROGRAM returns information about the attributes of the program that is currently running. If this call is issued from within a global or task-related user exit, it returns the attributes of the global or task-related user exit program itself.

INQUIRE_CURRENT_PROGRAM

DFHPGISX [CALL,]
      [CLEAR,]
      [IN,
      FUNCTION(INQUIRE_CURRENT_PROGRAM),]
      [IGNORE_EXITS(YES|NO),]
      [OUT,
      [AVAIL_STATUS(DISABLED|ENABLED),]
      [CEDF_STATUS(CEDF|NOCEDF|NOT_APPLIC),]
      [CURRENT_AMODE(24|31|64),]
      [CURRENT_CEDF_STATUS(CEDF|NOCEDF),]
      [CURRENT_ENTRY_POINT(name4),]
      [CURRENT_ENVIRONMENT(EXEC|GLUE|PLT|SYSTEM|TRUE|URM),]
      [CURRENT_EXECUTION_SET(DPLSUBSET|FULLAPI),]
      [CURRENT_LOAD_POINT(name4),]
      [CURRENT_PROGRAM_LENGTH(name4),]
      [CURRENT_PROGRAM_NAME(name8),]
      [DATA_LOCATION(ANY|BELOW|NOT_APPLIC),]
      [DYNAMIC_STATUS(DYNAMIC|NOT_DYNAMIC),]
      [EXECUTION_KEY(CICS|NOT_APPLIC|USER),]
      [EXECUTION_SET(DPLSUBSET|FULLAPI|NOT_APPLIC),]
      [HOLD_STATUS(CICS_LIFE|NOT_APPLIC|TASK_LIFE),]
      [IGNORE_EXITS(YES|NO),]
      [INSTALL_TYPE(AUTO|CATALOG|GROUPLIST|MANUAL|RDO|SYSAUTO),]
      [INVOKING_ENVIRONMENT (EXEC|GLUE|PLT|SYSTEM|TRUE|URM),]
      [INVOKING_PROGRAM_NAME(name8),]
      [LANGUAGE_DEDUCED(ASSEMBLER|C370|COBOL|
                          COBOL2|LE370|NOT_APPLIC|NOT_DEDUCED|PLI),]
      [LANGUAGE_DEFINED(ASSEMBLER|C370|COBOL|
                          LE370|NOT_APPLIC|NOT_DEFINED|PLI),]
      [LIBRARY(name8),]
      [LIBRARYDSN(name44),]
      [LOAD_STATUS(LOADABLE|NOT_APPLIC|NOT_LOADABLE|NOT_LOADED),]
      [MODULE_TYPE(MAPSET|PARTITIONSET|PROGRAM),]
      [NEW_PROGRAM_TOKEN(name4),]
      [REMOTE_DEFINITION(LOCAL|REMOTE),]
      [REMOTE_PROGID(name8),]
      [REMOTE_SYSID(name4),]
      [REMOTE_TRANID(name4),]
      [RETURN_PROGRAM_NAME(name8),]
      RESPONSE(name1 | *),
      REASON(name1 | *)]

This command is threadsafe.

Note: The options not described in the following list are identical to the equivalent options of the INQUIRE_PROGRAM call. See The INQUIRE_PROGRAM call.
CURRENT_AMODE(24|31|64)
Returns the addressing mode that the running program is currently using.
CURRENT_CEDF_STATUS(CEDF|NOCEDF)
Returns the EDF status of the current instance of the program. The value returned is the same as for CEDF_STATUS, which is the EDF status specified on the program definition. See the CEDF_STATUS option of INQUIRE_PROGRAM.
CURRENT_ENTRY_POINT(name4)
Returns the entry point address of the current program.
CURRENT_ENVIRONMENT(EXEC|GLUE|PLT|SYSTEM|TRUE|URM)
Returns the environment in which the current program is running; that is, the type of program it is.
EXEC
User application program.
GLUE
Global user exit program.
PLT
Program list table program.
SYSTEM
CICS® system code.
TRUE
Task-related user exit program.
URM
User-replaceable program.
CURRENT_EXECUTION_SET(DPLSUBSET|FULLAPI)
Returns the API execution set used by the current instance of the program. The value returned is the same as for EXECUTION_SET (which is the API execution set specified on the program definition) unless this is the first program in a transaction, when the value can be different. This is because the DPLSUBSET attribute applies only to linked-to programs. It is ignored for the first program in a transaction, because this cannot be the target of a DPL call. Therefore, for the first program in a transaction, if EXECUTION_SET returns DPLSUBSET, CURRENT_EXECUTION_SET nevertheless returns FULLAPI. See the EXECUTION_SET option of INQUIRE_PROGRAM.
CURRENT_LOAD_POINT(name4)
Returns the load point address of the current program.
CURRENT_PROGRAM_LENGTH(name4)
Returns the length of the current program, in bytes, expressed in binary.
CURRENT_PROGRAM_NAME(name8)
Returns the name of the program that is currently running.
IGNORE_EXITS(YES|NO)
Specifies whether global user exit programs and task-related user exit programs are ignored when returning information about the program that invoked the current program, and to which control will be returned. Your setting for this option affects the values returned by the INVOKING_ENVIRONMENT, INVOKING_PROGRAM_NAME, and RETURN_PROGRAM_NAME options. If YES is specified (the default), global user exit programs and task-related user exit programs are ignored for these options. If NO is specified, where a global user exit program or task-related user exit program is involved, the options return information about the exit program.
INVOKING_ENVIRONMENT (EXEC|GLUE|PLT|SYSTEM|TRUE|URM)
Returns the environment from which the current program was invoked; that is, the environment that corresponds to the program named in INVOKING_PROGRAM_NAME. The values are as described for CURRENT_ENVIRONMENT.
INVOKING_PROGRAM_NAME(name8)
Returns the name of the most recent program to invoke the current program. If IGNORE_EXITS(NO) is specified, this might be a global user exit program or task-related user exit program, if one was involved. If IGNORE_EXITS(YES) is specified, which is the default, this is the most recent program that was not a global user exit program or task-related user exit program.
LIBRARY(name)
Returns the 8-character name of the LIBRARY resource from which this program was loaded. This field is blank if the program has not been loaded, or if the LPASTATUS is LPA (indicating that the program has been loaded from the LPA). If the program was loaded from an installed LIBRARY, the LIBRARY and LIBRARYDSN names are returned.
LIBRARYDSN(data-area)
Returns the 44-character name of the data set from which the program was loaded. This fields is blank if the program has not been loaded, or if the LPASTATUS is LPA (indicating that the program has been loaded from the LPA). If the program was loaded from an installed LIBRARY, the LIBRARY and LIBRARYDSN names are returned.
RETURN_PROGRAM_NAME(name8)
Returns the name of the program to which control will be returned. If IGNORE_EXITS(NO) is specified, this might be a global user exit program or task-related user exit program. If IGNORE_EXITS(YES) is specified, which is the default, this is the program to which control will be returned after any intermediate global user exit programs or task-related user exit programs have completed.

RESPONSE and REASON values for INQUIRE_CURRENT_PROGRAM

RESPONSE REASON
OK None
EXCEPTION NO_CURRENT_PROGRAM
DISASTER LOCK_ERROR
  ABEND
INVALID None
KERNERROR None
PURGED None