Retrieve CCSID Data (QLGRTVCD)


  Required Parameter Group:

1 Receiver variable Output Char(*)
2 Length of receiver variable Input Binary(4)
3 Request type Input Binary(4)
4 Encoding Scheme Input Binary(4)
5 Error code I/O Char(*)

  Default Public Authority: *USE

  Threadsafe: Yes

The Retrieve CCSID Data (QLGRTVCD) API retrieves different subsets of CCSIDs based on the selection type. A typical use of this API would be to create a list of all the CCSIDs that are valid for a job.


Authorities and Locks

None.


Required Parameter Group

Receiver variable
OUTPUT; CHAR(*)

The buffer that receives the CCSID information. Refer to the Format of Receiver Variable for details about the format.

Length of receiver variable
INPUT; BINARY(4)

The size, in bytes, of the buffer that receives the CCSID information. The minimum size is 8.

Request type
INPUT; BINARY(4)

The type of information requested.

0 Retrieve all supported CCSIDs valid for this job.
1 Retrieve all supported CCSIDs valid for any job.
2 Retrieve all supported CCSIDs for the provided encoding scheme.
3 Retrieve the current default job CCSID value.

Encoding scheme
INPUT; BINARY(4)

The encoding scheme requested, if request type is 2. The parameter must be x'0000' if the request type is not 2. Some examples of supported encoding schemes are:

Single-byte data '1100'X, '2100'X, '3100'X, '4100'X, '4105'X, '4155'X, '5100'X, '5150'X, '6100'X
Double-byte data '1200'X, '2200'X, '3200'X, '5200'X, '7200'X
Mixed EBCDIC data '1301'X
Mixed PC data '2300'X, '3300'X
ISO-2022 data '5404'X
EUC data '4403'X

See the i5/OS globalization topic collection for more information on CCSID values and encoding schemes.

Error code
I/O; CHAR(*)

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


Format of Receiver Variable

The following table describes the information that is returned in the receiver variable. For a detailed description of each field, see Field Descriptions.

Offset Type Field
Dec Hex
0 0 BINARY(4) CCSIDs returned
4 4 BINARY(4) CCSIDs available
    ARRAY (*)of BINARY(4) Array of CCSIDs


Field Descriptions

Receiver variable. An array of 4-byte CCSID values that match the requested type.

CCSIDs available. The number of possible entries being returned. All available data is returned if enough space is provided.

CCSIDs returned. The actual number of CCSIDs that is being returned. If the data is truncated because the receiver variable is not large enough to hold all the data available, this value is less than the CCSIDs available.


Error Messages

Message ID Error Message Text
CPF3BF9 E Encoding scheme value not correct for requested type.
CPF3BFA E Request type not valid.
CPF24B4 E Severe error while addressing parameter list.
CPF2647 E Buffer length not valid.
CPF3CF1 E Error code parameter not valid.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.


API Introduced: V4R4

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