Convert Case (QLGCNVCS, QlgConvertCase) API


  Required Parameter Group:


  Service Program: QLGCASE

  Default Public Authority: *USE

  Threadsafe: No

The Convert Case (OPM, QLGCNVCS; ILE, QlgConvertCase) API provides a case conversion function that can be directly called by any application program. This API can be used to convert character data to either uppercase or lowercase.

This API supports conversion for single-byte, mixed-byte, and UCS2 (Universal Multiple-Octet Coded Character Set with 16 bits per character) character sets. For the mixed-byte character set data, only the single-byte portion of the data is converted. This API does not convert double-byte character data from any double-byte character set (DBCS) or from a mixed-byte character set.

This API can base case conversion on a CCSID, whereas the Convert Data (QDCXLATE) API uses only table objects.


Authorities and Locks

Table Authority
*USE

Table Library
*USE

Table Lock
*SHRNUP

Required Parameter Group

Request control block
INPUT; CHAR(*)

The information that defines the case conversion alternatives. Refer to Format of Request Control Block for details.

Input data
INPUT; CHAR(*)

The input data being converted.

Output data
OUTPUT; CHAR(*)

The converted output data that is returned to the calling program. The storage allocated for this output buffer parameter must be at least as long as the input data buffer or unpredictable results may occur.

Length of data
INPUT; BINARY(4)

The length of the data being converted in the input data parameter. Any data that extends beyond the specified length is ignored. The specified length must be a value greater than 0 and less than 16 773 104 bytes.

The length of the storage allocated for the output data is assumed to be the same size as the length of the input data.

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 Request Control Block

The following table shows the layout of the request control block. For a detailed description of each field, see Field Descriptions.



Field Descriptions

Case request. A request that specifies the type of case conversion to be performed. Valid values are:

CCSID of input data. The coded character set identifier (CCSID) of the input data to be converted. Case conversion is performed based on this CCSID. For a list of valid CCSIDs, see the i5/OS globalization topic collection. The valid values are:

DBCS indicator. The indicator that specifies whether or not double-byte data exists in the input data.

When the DBCS indicator is 0 but the input data contains double-byte values, this API processes the double-byte data as single-byte data. This also pertains to the shift-in and shift-out characters. It is recommended that an indicator of 0 be used when processing input data that contains only single-byte data because the performance is faster.

Length of user-defined table. The length (in bytes) of the user-defined case conversion table. This length must be 256.

Qualified table name. The table used to convert the data. The first 10 characters contain the table name. The second 10 characters contain the name of the library in which the table resides.

The system-supplied tables only provide uppercasing of the data. For a list of valid case conversion tables supplied by the system, see the i5/OS globalization topic collection.

You can use the following special values for the library name:

Reserved. A reserved field that must be set to hexadecimal zeros.

Type of request. The input information format of the case conversion being requested. The layout of the request control block parameter is based on one of the following values:

User-defined case conversion table. The user-defined case conversion table used to convert the input data.


Error Messages



API introduced: V3R1

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