1 | Receiver variable | Output | Char(*) |
2 | Length of receiver variable | Input | Binary(4) |
3 | Format name | Input | Char(8) |
4 | Qualified object name | Input | Char(20) |
5 | Object type | Input | Char(10) |
6 | Qualified bound module name | Input | Char(20) |
7 | Error Code | I/O | Char(*) |
The Retrieve Program Interface Information (QBNRPII) API is used to retrieve program interface information from modules that are bound into programs or service programs and place the information into a single variable in the calling program. The amount of information returned is limited to the size of the variable.
You can use the QBNRPII API to retrieve program interface information such as:
The variable that is to receive the information requested. The minimum size for this area is 8 bytes. You can specify the size of this area to be smaller than the format requested if you specify the length of receiver variable parameter correctly. As a result, the API returns only the data that the area can hold.
The length of the receiver variable. If this value is larger than the actual size of the receiver variable, the results may not be predictable. The minimum value is 8.
The content and format of the information returned for the program or service program.
The possible format names are:
RPII0100 | Program interface information. |
The first 10 characters contain the name of the program or service program object. The second 10 characters contain the name of the library where the object is located.
You can use these special values for the library name:
*CURLIB | The job's current library |
*LIBL | The library list |
The object type of the object for which interface information is to be returned.
The possible object types are:
*PGM | Retrieve interface information from a program object. |
*SRVPGM | Retrieve interface information from a service program object. |
The first 10 characters contain the name of the bound module. The second 10 characters contain the name of the library where the module object was located at the time it was bound into the program or service program object.
You can use this special value for the bound module name:
*ALLBNDMOD | Retrieve interface information for all bound modules for the program object. If *ALLBNDMOD is specified for the module name, the library name must be blank. |
You can use this special value for the library name:
*ANY | Retrieve interface information for any bound modules matching the specified module name. |
The structure in which to return error information. For the format of the structure, see Error code parameter.
The following information is returned for the RPII0100 format. For detailed descriptions of the fields in the table, see Field Descriptions.
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | BINARY(4) | Bytes returned |
4 | 4 | BINARY(4) | Bytes available |
8 | 8 | CHAR(10) | Object name |
18 | 12 | CHAR(10) | Object library |
28 | 1C | CHAR(10) | Object type |
38 | 26 | CHAR(2) | Reserved |
40 | 28 | BINARY(4) | Offset to first interface entry |
44 | 2C | BINARY(4) | Number of entries |
48 | 30 | CHAR(*) | Reserved |
These fields repeat for each entry retrieved | BINARY(4) | Offset to next interface entry | |
CHAR(10) | Module name | ||
CHAR(10) | Module library | ||
BINARY(4) | CCSID of interface information | ||
BINARY(4) | Type of interface information | ||
BINARY(4) | Offset to interface information | ||
BINARY(4) | Length of interface information returned | ||
BINARY(4) | Length of interface information available | ||
CHAR(*) | Reserved | ||
CHAR(*) | Interface information | ||
CHAR(*) | Reserved |
Bytes available. The number of bytes of data available to be returned. All available data is returned if enough space is provided.
Bytes returned. The number of bytes of data returned.
CCSID (Coded Character Set ID) of interface information. The coded character set identifier (CCSID) of the interface data.
Interface information. The interface information for the bound module. See the type of interface information field for detailed information on the contents of this field.
Length of interface information available. The number of bytes available to be returned in the Interface information field. All available data will be returned if enough space is provided.
Length of interface information returned. The number of bytes returned in the Interface information field.
Module library. The name of the library where the module object was located at the time it was bound into the program or service program.
Module name. The name of the bound module.
Number of entries. The number of entries retrieved.
Object library. The name of the library where the object was found.
Object name. The name of the object for which interface information was retrieved.
Object type. The object type of the object.
Offset to first interface entry. The offset at which the first interface information entry begins. This value is relative to the start of the receiver variable. If this value is 0, there are no entries available.
Offset to interface information. The offset to the interface information retrieved for this entry. This value is relative to the start of the receiver variable.
Offset to next interface entry. The offset to the next interface information entry. This value is relative to the start of the receiver variable. If this value is 0, there are no more entries available.
Reserved. An unused field.
Type of interface information. The type of interface information returned for the module.
The possible value is:
1 | The interface information is Program Call Markup Language (PCML) data. PCML is a tag language used to describe the input and output parameters for service programs and bound programs. See the Program Call Markup Language topic for more information about PCML data. |
Message ID | Error Message Text |
---|---|
CPF2150 E | Object information function failed. |
CPF2151 E | Operation failed for &2 in &1 type *&3. |
CPF24B4 E | Severe error while addressing parameter list. |
CPF3CF1 E | Error code parameter not valid. |
CPF3C19 E | Error occurred with receiver variable specified. |
CPF3C20 E | Error found by program &1. |
CPF3C21 E | Format name &1 is not valid. |
CPF3C24 E | Length of the receiver variable is not valid. |
CPF3C3A E | Value for parameter &2 for API &1 not valid. |
CPF8122 E | &8 damage on library &4. |
CPF8123 E | Damage on object information for library &4. |
CPF8129 E | Program &4 in &9 damaged. |
CPF813D E | Service program &4 in &9 damaged. |
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. |
CPF9806 E | Cannot perform function for object &2 in library &3. |
CPF9807 E | One or more libraries in library list deleted. |
CPF9808 E | Cannot allocate one or more libraries on library list. |
CPF9810 E | Library &1 not found. |
CPF9811 E | Program &1 in library &2 not found. |
CPF9820 E | Not authorized to use library &1. |
CPF9821 E | Not authorized to program &1 in library &2. |
CPF9830 E | Cannot assign library &1. |
CPF9872 E | Program or service program &1 in library &2 ended. Reason code &3. |
[ Back to top | Program and CL Command APIs | APIs by category ]