How the DBCS code conversion should be do to convert DBCS codes in a file to other DBCS codes?
Release : 6.4
Component : CA EASYTRIEVE REPORT GEN
To use the DBCS function, DBCSCODE parameters should be coded in targeted input file and output file. And K type fields or M type fields should be coded for the targeted fields that you want to converted as follows.
(Sample definitions for files & fields.)
FILE FILEA DBCSCODE IBM
IN-FLD1 1 5 A
IN-KNJFLD 6 10 K
IN-MIXFLD 11 10 M
...
FILE FILEB DBCSCODE JEF FB(200 4000)
OUT-FLD1 1 5 A
OUT-KNJFLD 6 10 K
OUT-MIXFLD 11 10 M
...
By using assignment statement to the targeted Kanji fields and Mixed fields, the data are moved and converted the DBCS codes based on the DBCSCODE parameter in the targeted files.
(Sample assignment statements)
OUT-FLD1 = IN-FLD1 (The conversion isn't done because the field type isn't K or M.)
OUT-KNJFLD = IN-KNJFLD ( The DBCS codes conversion is done based on the DBCSCODE JEF in the output file.)
OUT-MIXFLD = IN-MIXFLD ( The DBCS codes conversion is done based on the DBCSCODE JEF in the output file.)
PUT FILEB
※Note:
1. Only the following CODE types can be specified for the DBCSCODE parameter.
IBM ... IBM DBCS code
JEF or JEF4040 ... JEF DBCS code
KEIS or KEIS4040 ... Hitach DBCS code
JIS ... JIS DBCS code
MELCOM ... Mitubishi DBCS code
SHOWA ... Showa DBCS code
JIPSE ... NEC DBCS code
TORAY ... Toray DBCS code
2. The DBCS codes that can be converted are only the 1st and 2nd levels of the JIS code at 1978 edition.
(Sample program)
FILE FILEA DBCSCODE IBM
IN-FLD1 1 5 A
IN-KNJFLD 6 10 K
IN-MIXFLD 11 10 M
*
FILE FILEB DBCSCODE JEF FB(200 4000)
OUT-FLD1 1 5 A
OUT-KNJFLD 6 10 K
OUT-MIXFLD 11 10 M
*
JOB INPUT(FILEA)
OUT-FLD1 = IN-FLD1
OUT-KNJFLD = IN-KNJFLD
OUT-MIXFLD = IN-MIXFLD
PUT FILEB