MBCS Conversions
Multibyte Character Set (MBCS) support enables you to convert between Unicode and other code sets supported on the z/OS platform. To perform an MBCS conversion, use the CODEPAGE parameter of the COPY statement FROM and/or TO SYSOPTS clauses.
You can perform MBCS conversions in the following ways:
- Perform a conversion on the FROM node only and then send the Unicode file to the TO node.
- Send a file to the TO node and let that node perform the conversion.
- Perform a conversion from one z/OS compatible code set to a Unicode code set supported on the local node (specified in the FROM clause CODEPAGE parameter). Then send the encoded Unicode file to the remote node to be converted to another z/OS compatible code set.
Instead of requiring that each IBM® Connect:Direct® node provide the capability to convert from any supported character set to any other supported character set, the recommended approach is to convert the original character set to a common intermediate form (UTF-8 or UCS-2) on the local node, transmit the intermediate form to the remote node, and then perform the conversion to the final desired character set on the remote node. This way, each node is responsible only for conversion between the Unicode encoding and the character sets relevant to and supported by the node.
When you output an MBCS file, it should allow for a flexible output record length, thus z/OS files should be specified as Variable Format (RECFM=VB). Also, to allow for a possible increase in data length due to conversion, the LRECL of the receiving file must be larger than the LRECL of the sending file. In the example shown below, the LRECL of the sending file is 80.
|
For this particular MBCS conversion, the receiving file was successfully created by specifying LRECL as 90. Other conversions may require a larger value to avoid an SVSJ032I error during the Copy. If RECFM=VB, BLKSIZE for the output file must be at least as large as LRECL+4.
To display the CODEPAGE specification for a COPY step in a Process after step completion, use the Select Statistics command for an SY Statistics record. Each node involved in a COPY generates an SY record containing the SYSOPTS relevant to that node.
Except for syntax, the CODEPAGE parameter is not validated when the Process is submitted. However, when the Process is executed, an MBCS001E error will result on the node attempting the conversion if an invalid code set is specified.
For additional Process examples, search on MBCS Conversion in the Connect:Direct Process Language help.