The MQXCNVC call has the following parameters.
Connection handle.
This handle represents the connection to the queue manager. It should normally be the handle passed to the data-conversion exit in the DXHCN field of the MQDXP structure; this handle is not necessarily the same as the handle specified by the application which issued the MQGET call.
On i5/OS, the following special value can be specified for HCONN:
Options that control the action of MQXCNVC.
Zero or more of the options described below can be specified. If more than one is required, the values can be added together (do not add the same constant more than once).
Default-conversion option: The following option controls the use of default character conversion:
This option specifies that default character conversion can be used if one or both of the character sets specified on the call is not supported. This allows the queue manager to use an installation-specified default character set that approximates the specified character set, when converting the string.
The default character sets are defined by a configuration option when the queue manager is installed or restarted.
If DCCDEF is not specified, the queue manager uses only the specified character sets to convert the string, and the call fails if one or both of the character sets is not supported.
Padding option: The following option allows the queue manager to pad the converted string with blanks or discard insignificant trailing characters, in order to make the converted string fit the target buffer:
This option requests that conversion take place in such a way that the target buffer is filled completely:
If there are too few insignificant trailing characters, as much of the string as will fit is placed in the target buffer, and the call completes with CCWARN and reason code RC2120.
Insignificant characters are:
If this option is not specified:
If the converted string fits in the target buffer, the call completes with CCOK and reason code RCNONE.
If the converted string is too big for the target buffer, as much of the string as will fit is placed in the target buffer, and the call completes with CCWARN and reason code RC2120. Note that fewer than TGTLEN bytes can be returned in this case.
Encoding options: The options described below can be used to specify the integer encodings of the source and target strings. The relevant encoding is used only when the corresponding character set identifier indicates that the representation of the character set in main storage is dependent on the encoding used for binary integers. This affects only certain multibyte character sets (for example, UCS-2 character sets).
The encoding is ignored if the character set is a single-byte character set (SBCS), or a multibyte character set whose representation in main storage is not dependent on the integer encoding.
Only one of the DCCS* values should be specified, combined with one of the DCCT* values:
The encoding values defined above can be added directly to the OPTS field. However, if the source or target encoding is obtained from the MDENC field in the MQMD or other structure, the following processing must be done:
If not specified, the encoding options default to undefined (DCC*UN). In most cases, this does not affect the successful completion of the MQXCNVC call. However, if the corresponding character set is a multibyte character set whose representation is dependent on the encoding (for example, a UCS-2 character set), the call fails with reason code RC2112 or RC2116 as appropriate.
Default option: If none of the options described above is specified, the following option can be used:
DCCNON is defined to aid program documentation. It is not intended that this option be used with any other, but as its value is zero, such use cannot be detected.
Coded character set identifier of string before conversion.
This is the coded character set identifier of the input string in SRCBUF.
Length of string before conversion.
This is the length in bytes of the input string in SRCBUF; it must be zero or greater.
String to be converted.
This is the buffer containing the string to be converted from one character set to another.
Coded character set identifier of string after conversion.
This is the coded character set identifier of the character set to which SRCBUF is to be converted.
Length of output buffer.
This is the length in bytes of the output buffer TGTBUF; it must be zero or greater. It can be less than or greater than SRCLEN.
String after conversion.
This is the string after it has been converted to the character set defined by TGTCSI. The converted string can be shorter or longer than the unconverted string. The DATLEN parameter indicates the number of valid bytes returned.
Length of output string.
This is the length of the string returned in the output buffer TGTBUF. The converted string can be shorter or longer than the unconverted string.
Completion code.
Reason code qualifying CMPCOD.
If CMPCOD is CCWARN:
If CMPCOD is CCFAIL:
For more information on these reason codes, see Appendix A. Return codes.
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
amqwak02219 |