Retrieve Country or Region Identifiers (QLGRTVCI) API


  Required Parameter Group:

1 Receiver variable Output Char(*)
2 Length of receiver variable Input Binary(4)
3 Format name Input Char(8)
4 Error code I/O Char(*)

  Default Public Authority: *USE

  Threadsafe: Yes

The Retrieve Country or Region Identifiers (QLGRTVCI) API retrieves a list of country or region identifiers and their descriptions.


Authorities and Locks

None.


Required Parameter Group

Receiver variable
OUTPUT; CHAR(*)

The variable to receive the requested information. You can specify the size of the area to be smaller than the format requested, provided you specify the length of the receiver variable parameter correctly. As a result, the API returns only the data the area can hold.

Length of receiver variable
INPUT; BINARY(4)

The length of the receiver variable. If the length is larger than the size of the receiver variable, the results may not be predictable. The minimum length is 8 bytes.

Format name
INPUT; CHAR(8)

The content and format of the information returned. The possible format names are:

RTVC0100 Basic country or region identifier format

For details about the formats, see Format of the Generated Information.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter. If this parameter is omitted, diagnostic and escape messages are issued to the application.


Format of the Generated Information

The following table shows the format of the information returned. For a detailed description of each fields, see Field Descriptions.

RTVC0100 Format

Offset Type Field
Dec Hex
0 0 Binary(4) Bytes returned
4 4 Binary(4) Bytes available
12 C Binary(4) CCSID value of descriptive text
16 10 Binary(4) Offset to start of country or region identifier array
8 8 Binary(4) Number of country or region identifiers returned
20 14 CHAR(*) Reserved
Note: Format of country or region identifier array. The following fields are repeated for each country or region identifier entry.
0 0 CHAR(2) Country or region identifier
2 2 CHAR(40) Descriptive text


Field Descriptions

Bytes available. The number of bytes of information available.

Bytes returned.The number of bytes of information returned.

CCSID value of descriptive text.The coded character set identifier (CCSID) in which all the descriptive texts are encoded.

Descriptive text.The 40-byte descriptive text associated with the country or region identifier.

Country or region identifier.The two-character country or region identifier.

Number of country or region identifiers retrieved. The number of country or region identifiers in the list.

Offset to start of country or region identifier array.The offset to the start of the country or region identifier array.

Reserved. An ignored field.


Error Messages

Message ID Error Message Text
CPF24B4 E Sever error while addressing parameter list.
CPF3C19 E Error occurred with receiver variable specified.
CPF3C21 E Format name &1 is not valid.
CPF3C24 E Length of the receiver variable is not valid.
CPF3C90 E Literal value cannot be changed.
CPF3CF1 E Error code parameter not valid.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.


API introduced: V4R5

[ Back to top | National Language Support APIs | APIs by category ]