IGZXAPI — COBOL file and runtime information query routine

Purpose

IGZXAPI is a loadable module that can be called to query information about a running COBOL program. Sample code for calling the routine is as follows:

LOAD  EP=IGZXAPI
..
LA    R1,[parm area]    
BALR  R14,R15         
.. 
[parm area] is an array of addresses. Only the first address entry is used. This address must point to one of the XINFO DSECT parameter blocks described in this topic. For example, use XINFO3 DSECT to get the WSA (Writable Static Area).
To call the routine under CICS, you can use the following sample code:

EXEC CICS LOAD PROGRAM ('IGZXAPI ')
   SET ([load_addr])
   ENTRY ([ep_addr])
   ...
L    R15,[ep_addr]
LA   R1,[parm area]
BALR R14,R15xx
[parm area] is an array of addresses. Only the first address entry is used. This address must point to one of the XINFO DSECT parameter blocks described in this topic. For example, use XINFO3 DSECT to get the Writable Static Area (WSA)).

In AMODE 31, the routine can also be called statically. The static entry point name is IGZXAPS. Include the data set SCEELKED in the SYSLIB DD when link-editing your program to this static entry point.

In this description, a DSECT is also known as an "information structure".

Syntax

void IGZXAPI

R1 (input)
Points to the parameter area.
R13 (input)
Points to a save area.
R14 (input)
Is the return address.
R15 (input)
Is the entry point address of IGZXAPI.
(output)
The data structure (XINFO or XINFO8) is populated. Registers R2-R14 remain unchanged.
R15 (output)
Is the return code upon return from the routine. The following table lists the possible return codes and their descriptions.
Return code Description
-1 COBOL internal control areas are corrupted. For function code 1 and 4, this means that the FileControl Block is corrupted.
-2 COBOL internal file information area is corrupted.
-3 The length of the input parameter information structure is too short.
-4 The input DSA does not belong to a program compiled with COBOL V5 or later compilers.
-5 The input Entry Point is invalid, or does not belong to a program compiled with COBOL V5 or later compilers.
-6 COBOL internal control area associated with the program to be queried is corrupted.
-11 COBOL internal control area associated with the dynamic-length elementary item to be queried is corrupted.
-12 The pointer to the XINFO structure is zero.
-13 For XINFO12, the XSRAD12Q or XSRAD12X field is zero.
-15 CLLE chain is corrupted. Recursive list item encountered.
-20 CLLE chain is corrupted. Maximum iteration count encountered.
-21 Language Environment enclave invalid.
-22 COBOL enclave not found.
-23 CLLE list not found.
-24 No CEESTART entry found.
-25 COBOL and Language Environment do not recognize entry point.
-26 No CLLE found.
-99 The function code is not valid.
0 The call returns successfully.
1 The file to be queried or updated is not found.

If IGZXAPI is entered in AMODE 31, the layouts of the information structure are shown in Layout of the information structure for AMODE 31. The COBOL program to be queried should be AMODE 31. If IGZXAPI is entered in AMODE 64, the layouts of the information structure are shown in Layout of the information structure for AMODE 64. The COBOL program to be queried should be AMODE 64.

For AMODE 64, the save area pointed to by R13 is 144 bytes. There are additional requirements for a work area.