Get Short Form with Maximal CS for Specified ES and CP (CDRSMXC, QTQSMXC) API


  Required Parameter Group:


  Default Public Authority: *USE

  Threadsafe: Yes

The Get Short Form with Maximal CS for Specified ES and CP (CDRSMXC, QTQSMXC) API gets the CCSID with the maximal character set (CS) for a given code page (CP) value. The encoding scheme (ES) parameter can be specified to distinguish between usage of the same CP with two different encoding schemes, such as PC Display compared to PC Data.

The function works only with those CCSIDs that have only one (CS, CP) pair associated with them. That is, pure single-byte or pure double-byte CCSIDs (for those registered to date).

The CS element associated with the returned CCSID is the largest in size of all the character sets that are contained in its associated code page in the CCSID resource installed in the system.

Notes:

  1. Not all the registered code pages are full, leaving room for possible future additions. The term maximal is used to distinguish it from a full code page. Over time, when new larger character sets are registered for a code page (this can happen until the code page is full), the maximal character set also changes, leading to a new CCSID returned by this function.

  2. This API does NOT support any mixed or multibyte CCSIDs.

Authorities and Locks

None.


Required Parameters

CPIN
INPUT; INT(4)

This variable contains the CP value referenced, a positive number in the range 1 to 65,534.

ESIN
INPUT; INT(4)

This variable contains the ES value referenced;


CCSIDR
OUTPUT; INT(4)

This variable contains the returned CCSID value, a positive number in the range 1 to 65,279.

ESR
OUTPUT; INT(4)

This variable contains the ES value of the returned CCSID, a zero or a positive number in the range 4352 to 65,534.

FB
OUTPUT; FEEDBACK

The function returns, in this feedback array, the processing status (and any associated reason) for this function the field type is 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 hexadecimal) contained in the first 32 bits of FB, (the other 64 bits are reserved).


Feedback Codes and Conditions



Usage Notes

  1. Often it is required to find the CCSID when the ES, CS, and CP values are known. CS and CP (also known as CGCSGID or GCID) is used in many existing IBM® architectures and data streams and supporting products. Together with the CDRSCSP API, this function aids in coexistence and migration for products that have to deal with the short form (CCSID) of identification on one side and the intermediate form (CPGID) on the other. Because the intermediate forms are, by themselves, incomplete when used in some encoding schemes, the function can return only a default value as defined in the installation's resources, when the ESIN information is unknown.

  2. Some code page identifiers in use in the Far East refer to "pseudo" or "combined" code pages with the PC mixed and host mixed encoding schemes. These identifiers are to be used as CCSIDs rather than CPGIDs. The CDRSMXC function does not return the corresponding CCSIDs for these combined code page identifier values. Please refer to the documentation for the QTQSMXC2 API for support of some of these code page identifiers.

  3. When an ESIN value of zero is specified, the feedback code is never returned as zero. Absence of an error results in a 0001 0003 feedback code.

API introduced: V3R6

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