Because of differences in how data is interpreted in different runtime environments, your program may need to convert the data that passes from one environment to another. Data moving from Java™ environments to COBOL environments, and from COBOL to Java, always need data conversion. Data conversion in IBM® Rational® EGL Community Edition occurs at Java run time.
Programs supporting bidirectional languages such as Arabic or Hebrew can use bidi conversion tables to specify the reordering of text data in addition to code page conversion. See the topic "Bidirectional language text" for information on creating bidi conversion tables.
In this case, you can specify the conversion table in a callLink element that refers to the called program. Alternatively, you can indicate (in that callLink element) that the sysVar.callConversionTable system variable identifies the conversion table at run time.
The table name in this case is a symbol that indicates the kind of conversion that is required at run time.
Remote Platforms | |||||
---|---|---|---|---|---|
Language | Linux® | UNIX® | Windows® 2000/NT/XP | z/OS UNIX System Services or iSeries® Java | z/OS or iSeries COBOL |
Arabic | CSOJ1046 | CSOJ1046 | CSOJ1256 | CSOJ420 | CSOE420 |
Chinese, simplified | CSOJ1381 | CSOJ1381 | CSOJ1386 | CSOJ1388 | CSOE1388 |
Chinese, traditional | CSOJ950 | CSOJ950 | CSOJ950 | CSOJ1371 | CSOE1371 |
Cyrillic | CSOJ866 | CSOJ866 | CSOJ1251 | CSOJ1025 | CSOE1025 |
Danish | CSOJ850 | CSOJ850 | CSOJ850 | CSOJ277 | CSOE277 |
Eastern European | CSOJ852 | CSOJ852 | CSOJ1250 | CSOJ870 | CSOE870 |
English (UK) | CSOJ850 | CSOJ850 | CSOJ1252 | CSOJ285 | CSOE285 |
English (US) | CSOJ850 | CSOJ850 | CSOJ1252 | CSOJ037 | CSOE037 |
French | CSOJ850 | CSOJ850 | CSOJ1252 | CSOJ297 | CSOE297 |
German | CSOJ850 | CSOJ850 | CSOJ1252 | CSOJ273 | CSOE273 |
Hebrew | CSOJ856 | CSOJ856 | CSOJ1255 | CSOJ424 | CSOE424 |
Japanese | CSOJ943 | CSOJ943 | CSOJ943 | CSOJ1390 (Katakana SBCS), CSOJ1399 (Latin SBCS) | CSOE1390 (Katakana SBCS), CSOE1399 (Latin SBCS) |
Korean | CSOJ1363 | CSOJ1363 | CSOJ1363 | CSOJ1364 | CSOE1364 |
Portuguese | CSOJ850 | CSOJ850 | CSOJ1252 | CSOJ037 | CSOE037 |
Spanish | CSOJ850 | CSOJ850 | CSOJ1252 | CSOJ284 | CSOE284 |
Swedish | CSOJ850 | CSOJ850 | CSOJ1252 | CSOJ278 | CSOE278 |
Swiss German | CSOJ850 | CSOJ850 | CSOJ1252 | CSOJ500 | CSOE500 |
Turkish | CSOJ920 | CSOJ920 | CSOJ1254 | CSOJ1026 | CSOE1026 |
When you are calling a program from Java, if you do not specify a value for the conversion table in the linkage options part, the default conversion tables are those for English (US).
Data conversion of records and structures is based on the declarations of the structure fields that do not have a substructure.
No conversion is performed for variables that have no name (indicated by an asterisk in a structured record), or for variables of type BIN, BIGINT, BOOLEAN, INT, SMALLINT, DECIMAL, MONEY, PACF, HEX, STRING, or UNICODE. However, if you are using a bidirectional conversion table, UNICODE and STRING variables will be reversed as defined in the table. For more information, see Working with bidirectional data.
Data of type CHAR, DBCHAR, or MBCHAR is converted in accordance with the COBOL or Java conversion tables.
For variables of type FLOAT and SMALLFLOAT, the conversion routine converts from Java to zSeries® COBOL and back using the IEEE 754 format for Java and the IBM 370 format for zSeries COBOL. No conversion is necessary for FLOAT and SMALLFLOAT variables between Java and iSeries COBOL.
On EBCDIC-to-ASCII conversion for MBCHAR data, the conversion routine deletes shift-out/shift-in (SO/SI) characters and inserts an equivalent number of blanks at the end of the variable. On ASCII-to-EBCDIC conversion, the conversion routine inserts SO/SI characters around double-byte strings and truncates the value at the last valid character that can fit in the field. If the MBCHAR field is in a variable length record and the current record end is in the MBCHAR field, the record length is adjusted to reflect the insertion or deletion of SO/SI characters. The record length indicates where the current record ends.
EBCDIC for type NUM | EBCDIC for type NUMC | ASCII |
---|---|---|
F (positive sign) | C | 3 |
D (negative sign) | D | 7 |
For variables of type DATE, INTERVAL, TIME, or TIMESTAMP, EGL converts the values using the CHAR algorithm and the string form of the variable.
You can find more information on the sysLib.convert() system function and the sysVar.callConversionTable system variable in the topics "convert()" and "callConversionTable."