Get Encoding Scheme, Character Set, and Code Page Elements (CDRGESP, QTQGESP) API


  Required Parameter Group:


  Default Public Authority: *USE

  Threadsafe: Yes

The most frequently accessed elements of a CCSID are the Encoding Scheme and the CS/CP elements. The function returns the value of the encoding scheme (ES) associated with CCSID1 in ES, and the values of CS and CP elements in CSCPL.

Authorities and Locks

None.


Required Parameter Group

CCSID1
INPUT; INT(4)

This variable contains the CCSID value referenced; a positive number in the range 1 to 65,533.

N1
INPUT; INT(4)

This variable contains the size of the allocated area starting at CSCPL to contain the returned data. N1 is specified as a number of elements, each CS/CP pair is counted as 2 elements. It is an even number greater than or equal to 2.

N2
I/O; INT(4)

This variable contains the number of values (each pair of CS and CP is counted as two values) associated with CCSID1 and returned in CSCPL providing that sufficient space (N1) was allocated. The first invocation of this function must have N2 initialized to zero.

ES
OUTPUT; INT(4)

This variable contains the ES value associated with CCSID1. It is a positive number in the range 4352 to 65,534.

CSCPL
OUTPUT; Array of INT(4)

Start of the area to contain the CS/CP elements returned. Each element is a pair of Binary(4) values. For each pair, the first value is the character set and the second value is the code page.

FB
OUTPUT; FEEDBACK

The function returns, in this feedback array, the processing status (and any associated reason) for this function; field type: array of three 32-bit two's complement binary values (12 bytes, or 96 bits); the status code is a non-negative number in the first 16 bits, and the reason code is a non-negative number in the second 16 bits. The following are specific meanings of the status code and associated reason code values (in Hex) contained in the first 32 bits of FB:


Feedback Codes and Conditions



Usage Notes

  1. The maximum number of (CS, CP) values depends on the ES. Most CCSIDs have only one pair of (CS, CP) values. A calling function can set N1 to 32, to accommodate up to 16 pairs of (CS, CP) values without overflow.

API introduced: V2R2

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