Retrieve Language Information (QLGRLNGI) API


  Required Parameter Group:

1 Receiver variable Output Char(*)
2 Length of receiver variable Input Binary(4)
3 Language selection information format name Input Char(8)
4 Language selection information Input Char(*)
5 Output format name Input Char(8)
6 Error code I/O Char(*)

  Default Public Authority: *USE

  Threadsafe: No

The Retrieve Language Information (QLGRLNGI) API returns a selected national language version (NLV) based on the specified product, option, and language identifier. This API can be used to determine the correct NLV directory to be used to locate translatable information.

Note: The format LNGR0100 returns CCSID information about an NLV. These values are the CCSIDs that are used when language translation is done for a given NLV, but do not imply whether or not a particular product or portion of a product has actually been translated. If runtime conversions are to be done on translatable data, they should be based on how the specific data is tagged.


Authorities and Locks

Product Availability Lock
*SHRRD

The product availability object resides in the QUSRSYS library.


Required Parameter Group

Receiver variable
OUTPUT; CHAR(*)

The variable to receive the requested information.

Length of receiver variable
INPUT; BINARY(4)

The length of the receiver variable in bytes. The value specified must be at least 8.

Language selection information format name
INPUT; CHAR(8)

The content and format of the detailed input specification. The possible format names are:

LNGI0100 Specifies basic information about which product and option to return information for and the language ID to use. For more information, see LNGI0100 Format.
LNGI0110 Specifies basic information about which product and option to return information for and the language ID to use. This format will return the same information as format LNGI0100, but message CPF3BEE will not be issued if the primary language is not installed. For more information, see LNGI0110 Format.

Language selection information
INPUT; CHAR(*)

The detailed input specification information for this request.

Output format name
INPUT; CHAR(8)

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

LNGR0100 Returns basic information about the national language version (NLV) that best matches the specified product, option, and language ID. For more information, see LNGR0100 Format.
LNGR0200 Returns basic information about the national language version (NLV) that best matches the specified product, option, and language ID. It also returns information about the coded character set identifiers (CCSIDs) that are used to store the NLV information. For more information, see LNGR0200 Format.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.


LNGI0100 Format

Information passed in the language selection information parameter can be in the following format. For detailed descriptions of each field, see Field Descriptions.

Offset Type Field
Dec Hex
0 0 CHAR(7) Product ID
13 D CHAR(4) Product option
17 11 CHAR(10) Language ID


LNGI0110 Format

Information passed in the language selection information parameter can be in the following format. For detailed descriptions of each field, see Field Descriptions.

Offset Type Field
Dec Hex
0 0 CHAR(7) Product ID
13 D CHAR(4) Product option
17 11 CHAR(10) Language ID


Field Descriptions

Product ID. The product ID for which information is being requested. You can use this special value for the product ID:

*OPSYS The product ID for the operating system for the current release.

Product option. The option number for which information is being requested. Use 0000 for the base option. Valid values are 0000 through 0099, where each character is a digit.

Language ID. The 3-character language ID that should be used to locate the correct NLV. Valid values can be found by prompting the Create User Profile (CRTUSRPRF) command and looking at the LANGID parameter. You can use these special values:

*CURUSR Extract the language ID from the user profile that is currently in effect for the requesting job.
*SYSVAL Extract the language ID from the QLANGID system value.


Format of the Returned Information

Information that is returned in the receiver variable parameter can be in the following format. For detailed descriptions of the fields for each format, see Field Descriptions.

If the product load is not known to the system, an error (CPF0CAF) will occur. If the product load is known to the system, but the specified product option is not installed, an error (CPF3BDF) will occur. If the product and option are known and installed, but there is no primary language installed for it, an error (CPF3BEE) will occur.

LNGR0100 Format

Offset Type Field
Dec Hex
0 0 BINARY(4) Bytes returned
4 4 BINARY(4) Bytes available
8 8 CHAR(4) Selected NLV
12 C CHAR(4) NLV of primary language
16 10 CHAR(3) Language ID

LNGR0200 Format

Offset Type Field
Dec Hex
0 0 BINARY(4) Bytes returned
4 4 BINARY(4) Bytes available
8 8 CHAR(4) Selected NLV
12 C CHAR(4) NLV of primary language
16 10 BINARY(4) EBCDIC CCSID of selected NLV
20 14 BINARY(4) PC ASCII CCSID of selected NLV
24 18 BINARY(4) ISO ASCII CCSID of selected NLV
28 1C CHAR(3) Language ID


Field Descriptions

Bytes available. The number of bytes of data available to be returned to the user.

Bytes returned. The number of bytes returned to the user. This is the lesser of the number of bytes available and the length of the receiver variable.

EBCDIC CCSID of selected NLV. The CCSID that is used to store translated, EBCDIC textual data for the selected NLV.

ISO ASCII CCSID of selected NLV. The CCSID that is used to store translated, Internet-ASCII textual data for the selected NLV.

Language ID. The language identifier that is used in the determination of NLV. This will either be the specified value, the value from the current user profile, or the value from the QLANGID system value.

NLV of primary language. The NLV that is associated with the primary language installed for the specified product and option. If language selection information format LNGI0110 is specified, this field may contain blanks.

PC ASCII CCSID of selected NLV. The CCSID that is used to store translated, PC-ASCII textual data for the selected NLV.

Selected NLV. The NLV chosen as a result of the specified or determined language ID, and what NLVs are installed for the specified product and option. This will be the same as the NLV of the primary language if the language ID maps to an NLV that is not installed for the product.


Error Messages

Message ID Error Message Text
CPF0C4A E Product record not found.
CPF0C4B E Product availability object &2/&1 recovery required.
CPF0C4C E Cannot allocate object &1 in library &2.
CPF0C4D E Error occurred while processing object &1 in library &2.
CPF24B4 E Severe error while addressing parameter list.
CPF3BEE E Primary language not installed.
CPF3BDF E CCSID Product not installed.
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: V4R1

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