Dump COBOL (QlnDumpCobol) API
Required Parameter Group:
1 | Program object name | Input | Char(10) |
2 | Library name | Input | Char(10) |
3 | Module object name | Input | Char(10) |
4 | Program object type | Input | Char(10) |
5 | Dump type | Input | Char(1) |
6 | Error code | I/O | Char(*) |
Default Public Authority: *USE
Service Program: QLNRMAIN
Threadsafe: No
The Dump COBOL (QlnDumpCobol) API allows you to perform a formatted dump of an ILE COBOL program. You can call it from any ILE program; however, if the calling program is not an ILE COBOL program, only a data dump will be performed. Message CPF955F will be issued if this API is called to dump any module other than those created by the ILE COBOL compiler.
This API provides two types of dumps, a data dump and an extended dump. The data dump contains the following information:
- The name of each variable
- The data type
- The default value
- The hexadecimal value
Note: Only the first 250 characters of the values will be shown in the dump.
The extended dump contains the following additional information:
- The name of each file
- The system name of each file
- External/internal flag
- Open/close status
- Last I/O operation attempted
- Last file status
- Last extended status
- Blocking information
- Blocking factor
- Linage-counter value
- I/O feedback area information
- Open feedback area information
Variable values may only be requested if an active call stack entry exists for the module object specified in the job in which this API is called. Values existing in program static or automatic storage are not accessible by this API unless the program object has a current call stack entry. All variables that were defined by the compiler and stored in the module object's HLL symbol table will be returned.
Also, the module object for which variable information is requested must contain debug data. Thus, the module object must be compiled with a *DBGVIEW option other than *NONE.
Authorities
- Authority Required
-
- *SERVICE special authority and *USE authority to the input program, or
- *USE authority to the input program when the input program is the caller of the API, or
- *CHANGE authority to the input program
Required Parameter Group
- Program object name
- INPUT; CHAR(10)
The name of the program to be dumped. If this parameter is omitted, the program object name of the caller is used.
- Library name
- INPUT; CHAR(10)
The name of the library in which the program to be dumped is found. *CURLIB and *LIBL can be specified as valid values to indicate the current library and the library list, respectively. If this parameter is omitted, the library associated with the calling program is used.
- Module object name
- INPUT; CHAR(10)
The name of the module, within the specified program, to be dumped. If this parameter is omitted, the module object name of the caller is used.
- Program object type
- INPUT; CHAR(10)
The object type of the program object.
Valid values are:
*PGM Program object *SRVPGM Service program
- Dump type
- INPUT; CHAR(1)
The type of dump.
Valid values are:
D Data dump. Gives a dump of the COBOL identifiers. F Extended dump. Gives a dump of COBOL identifiers and file-related information.
- Error code
- I/O; CHAR(*)
The structure in which to return error information. For the format of the structure, see Error code parameter.
Error Messages
Message ID | Error Message Text |
---|---|
CPF3C21 E | Format name &1 is not valid. |
CPF3C90 E | Literal value cannot be changed. |
CPF3CF1 E | Error code parameter not valid. |
CPF3CF2 E | Error(s) occurred during running of &1 API. |
CPF9549 E | Error addressing API parameter. |
CPF954F E | Module &1 not found. |
CPF955F E | Program &1 not a bound program. |
CPF9562 E | Module &1 cannot be debugged. |
CPF956D E | Parameter does not match on continuation request. |
CPF956E E | Program language of module not supported. |
CPF956F E | Continuation handle parameter not valid. |
CPF9573 E | Program type parameter not valid. |
CPF9574 E | Call stack entry does not exist. |
CPF9579 E | Data option specified not valid. |
CPF9801 E | Object &2 in library &3 not found. |
CPF9802 E | Not authorized to object &2 in &3. |
CPF9803 E | Cannot allocate object &2 in library &3. |
CPF9809 E | Library &1 cannot be accessed. |
CPF9810 E | Library &1 not found. |
CPF9820 E | Not authorized to use library &1. |
API introduced: V3R6
[ Back to top | High-level language APIs | APIs by category ]