Get Short Form (CCSID) from Specified ES and (CS, CP) Pair (CDRSCSP, QTQSCSP) API


  Required Parameter Group:

1 CSCPL Input Int(4)
2 N1 Input Int(4)
3 ESIN Input Int(4)
4 CCSIDR Output Int(4)
5 ESR Output Int(4)
6 FB Output Feedback

  Default Public Authority: *USE

  Threadsafe: No

The Get Short Form (CCSID) from Specified ES and (CS, CP) Pair (CDRSCSP, QTQSCSP) API gets the CCSID associated with the specified (CS, CP) pairs and ES. It 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 (CGCSGID) on the other. The ES is further required to distinguish between usage of the same CS, CP with two different encoding schemes, (such as CS 00697 and CP 00850, with ES values of X'2100' and X'3100'), and when more than one CGCSGID is associated with a CCSID (such as with ES X'1301', X'2300', and X'3300')

Authorities and Locks

None.


Required Parameter Group

CSCPL
INPUT; INT(4)

This variable is an array whose format is CS1, CP1, CS2, CP2,...CSn, CPn. Each CS is a positive number in the range 1 to 65,535. Each CP is a positive number in the range 1 to 65,534. Each CP is placed in a single CSCPL array element.

N1
INPUT; INT(4)

This variable contains the number of elements in CSCPL, an even positive number in the range 2 to 32 (can accommodate up to 16 CS and CP pairs.)

ESIN
INPUT; INT(4)

This variable contains the ES value referenced, zero or a positive number in the range 4352 to 65,534. The implementation of this API supports only a value of 0 for this parameter.

ESIN Meaning
0 The caller does not know the ESID value. The CCSID returned is the first occurring in the CCSID resource repository whose CS and CP values match those specified in CSCPL.

CCSIDR
OUTPUT; INT(4)

This variable contains the returned CCSID value, a positive number in the range 1 to 65,534. A value of 65,535 is returned when the function could not find the requested CCSID.

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. The implementation of this API does not support the function of this parameter.

FB
OUTPUT; FEEDBACK

This 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.


Feedback Codes and Conditions

Status Reason Meaning
0000 0000 The function completed successfully.
0001 0001 No entry was found in the CCSID resource repository for the specified ESIN and CS, CP pairs.
0001 0002 A single CCSID value with the specified CSCPL was found, but not with the specified ESIN. The values of CCSID found and its associated ES are returned.
0002 0001 A CP value in CSCPL is zero.
0002 0002 A CS value in CSCPL is zero.
0003 0001 A CP value in CSCPL is 65,535.
0005 0001 N1 is odd.
0006 0001 The CCSID resource repository was not found.
0006 0002 The CCSID resource repository is currently unavailable.
0007 0001 The system CCSID resource repository accessed by the function was found to be invalid in structure.
0008 0001 A CS or CP value in CSCPL array is not in the range 0 to 65,535.
0008 0002 N1 is greater than the maximum permitted in this implementation.
0008 0003 N1 is less than 2.
0008 0004 ESIN value is nonzero and not in the range 4352 to 65,534.


Usage Notes

  1. Often it is required to find the CCSID when the ES and (CS,CP) values are known. CS, CP (also known as CGCSGID or GCID) is used in many existing IBM® architectures, data streams, and supporting products. 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 (CGCSGID) on the other. Intermediate forms are by themselves incomplete, that is, without an encoding scheme a single CCSID cannot be identified in all cases. The function can return only a default value as defined in the installation's resources when the ESIN information is not known.

  2. For the CCSIDs defined to date, the maximum number of CS, CP pairs is 2 (up to four values can be specified in CSCPL). There may be additional CCSIDs which meet the specified criteria.

API introduced: V2R2

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