Resolve Client Server CCSID (QTQRCSC) API


  Required Parameter Group:

1 Server CCSID Input Int(4)
2 Client CCSID Input Int(4)
3 Selection Input Int(4)
4 Resolved CCSID Output Int(4)
5 Feedback code Output Feedback

  Default Public Authority: *USE

  Threadsafe: No

The Resolve Client Server CCSID (QTQRCSC) API returns the CCSID that will enable the proper transfer of data between the server and the client.


Authorities and Locks

None.


Required Parameters

Server CCSID
INPUT; INT(4)

A variable that contains the CCSID value for the server. This value must be a positive number in the range 1 to 65 533.

Possible values follow:

0 The caller does not know the server job value. The default job CCSID value will be used.
1-65 533 The server CCSID value.

Client CCSID
INPUT; INT(4)

A variable that contains the CCSID value for the client. This value must be a positive number in the range 1 to 65 533.

Selection
INPUT; INT(4)

A variable that allows the user to specify what CCSID to return. If the resolved CCSID is not supported as a job CCSID for the system on which the API is being called, the API returns either that CCSID or finds the closest match for the system it is on. If the exact match is to be returned, but the CCSID is not supported on the host system, the feedback code is set.

Possible values follow:

0 Return the closest match for this system. If the client CCSID is mixed and the server system only handles single byte, find the closest match SBCS CCSID value.
1 Return an exact match for the resolved CCSID. The API will not take into account the available support on the server. The feedback code will be set if the CCSID value returned is not compatible with the system on which the API is being called.

Resolved CCSID
OUTPUT; INT(4)

A variable that contains the resolved CCSID value. This value must be a positive number in the range 1 to 65 279.

Feedback code
OUTPUT; FEEDBACK

In this feedback array, the function returns the processing status (and any associated reason) for this function. The field type is an 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 the feedback code. The other 64 bits are reserved.


Feedback Codes and Conditions

Status Reason Meaning
0000 0000 The function completed successfully.
0001 0007 The user requested a CCSID for a mixed system, and the API is being called on an SBCS system. An exact match was requested, so a warning is returned to indicate that the CCSID returned is not not valid as a job CCSID for the system on which this API is running.
0006 0001 The CCSID resource repository was not found.
0007 0001 The system CCSID resource repository accessed by the function was found to be incorrect in the structure.


Usage Notes

  1. This API uses the Get Related Default CCSID (CDRGRDC) and Get Encoding Scheme, Character Set, and Code Page Elements (CDRGESP) APIs to perform its functions. If any errors are found on the calls to these APIs, the feedback code is set to those values. Refer to the documentation for these two APIs for more feedback codes.

API introduced: V4R1
Top | National Language Support APIs | APIs by category