OpenTP1 Version 7 TP1/Client User's Guide TP1/Client/W, TP1/Client/P
PROCEDURE DIVISION
CALL 'CBLDCUTL' USING unique-name-1 unique-name-2 unique-name-3
DATA DIVISION
01 unique-name-1.
02 data-name-A PIC X(8) VALUE 'CNVEXEC'.
02 data-name-B PIC X(5).
02 FILLER PIC X(3).
02 data-name-C PIC S9(9) COMP VALUE ZERO.
02 data-name-D PIC S9(9) COMP.
02 data-name-E PIC 9(9) COMP.
01 unique-name-2.
02 data-name-F PIC S9(9) COMP.
02 data-name-G PIC X(n).
01 unique-name-3.
02 data-name-H PIC S9(9) COMP.
02 data-name-I PIC X(n).
(2) Purpose
Executes the following character code conversion.
Converts character strings consisting of JIS or Shift JIS code into character strings of EBCDIC, EBCDIK or KEIS code. Converts character strings consisting of EBCDIC, EBCDIK or KEIS code into character strings of JIS or Shift JIS code.
(3) Data area where the UAP sets values
- data-name-A
Set VALUE 'CNVEXEC' as the request code for indicating the execution of character code conversion.
- data-name-C
Specify the conversion condition (conversion option) using the sum of the values of options to be used.
- 0: Default (The default is applied without an option specified.)
- The EBCDIK code set is used.
- A two-byte space remains a two-byte space.
- The 1983 version of the KEIS code is used.
- If there is an invalid code, an error occurs.
- A tab or control code is not recognized as a one-byte code. Even when there is a two-byte code immediately before or after the code, a shift code is not added.
- 1: Uses the EBCDIC code.
- 2: Converts a two-byte space into two one-byte spaces. This value is valid only when the value of data-name-D is 1.
- 4: Uses the 1978 version of the KEIS code.
- 8: Converts an invalid code into a space.
- 16: A tab code is identified to be single-byte. A shift code is given to just the preceding or succeeding two-byte code if any.
- 32: A control code is identified to be single-byte. A shift code is given to just the preceding or succeeding two-byte code if any.
- data-name-D
Specify the conversion method.
- 1: Converts a JIS or Shift-JIS character string into a EBCDIC, EBCDIK, or KEIS character string.
- 2: Converts a EBCDIC, EBCDIK, or KEIS character string into a JIS or Shift-JIS character string.
- data-name-E
Specify the handle of the control table acquired by CBLDCUTL('CNVOPN ') for converting codes.
- data-name-F
Specify the length of the character string to be converted. You can specify a value from 1 to DCRPC_MAX_MESSAGE_SIZE.
- data-name-G
Specify the character string to be converted.
- data-name-H
Specify the length of the area that receives the converted character string.
- data-name-I
Specify the area for storing the converted character string. This area must be larger than the length specified for data-name-H.
(4) Data area for which a value is returned
- data-name-B
A five-digit status code is returned.
- data-name-H
The length of the converted character string is returned.
- data-name-I
The converted character string is returned.
(5) Status codes
Status code |
Meaning |
00000 |
Normal termination |
02501 |
Invalid value for the data name. The request code (data-name-A) may be invalid. |
02504 |
Insufficient memory.
The program returns this code also when the control table contains an invalid handle value and when the specified character length covers the first byte of a two-byte code that is contained in the character string to be converted. |
02550 |
A character string contains an invalid code. |
02551 |
The length of the converted character string exceeds the length of the area prepared by the CUP. |
- The use of this function requires a CommuniNet code mapping table. Before using this function, create a code mapping table using the CommuniNet code mapping utility.
- You cannot use a code mapping table unless you first save the table using the CommuniNet code mapping utility after the installation of CommuniNet. Before using this function, save a code mapping table using the CommuniNet code mapping utility.
- The filename of a CommuniNet code mapping table must be CMAPEX.TBL. Store the code mapping table under a Windows directory before using this function.
- The processing by the character code converter does not reflect changes made in a code mapping table by the CommuniNet code mapping utility during the use of this function.
- This function does not save error logs and UAP trace information.
- Issue the function for starting character code conversion (CBLDCUTL('CNVOPN ')) only once for code conversion (CBLDCUTL('CNVEXEC ')). Do not issue the function for starting character code conversion more than once to prevent memory shortage. If you issue two or more functions, issue a one function for terminating character code conversion (CBLDCUTL('CNVCLS ')) for each of the issued functions.
- When you specify 2 for data-name-D and 16 or 32 for data-name-C, you need to prepare data that contains single-byte tab or control codes.
All Rights Reserved. Copyright (C) 2006, 2009, Hitachi, Ltd.