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 conversion occurs at Java™ run time.
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 system variable sysVar.callConversionTable identifies the conversion table at run time.
In this case, you can specify the conversion table in a asynchLink element that refers to the program to which control is transferred. Alternatively, you can indicate (in that asynchLink element) that the system variable sysVar.callConversionTable identifies the conversion table at run time.
In these cases, you specify the bidirectional conversion table in the system variable sysVar.formConversionTable.
You would use runtime conversion, for example, if your code places values into one of two redefined records, each of which refers to the same area of memory as a record that is passed to another program. Assume that the characteristics of the data that you pass would be different, depending on the redefined record to which you assign values. In this case, the requirements of data conversion cannot be known at generation time.
The table name in this case is a symbol that indicates the kind of conversion that is required at run time.
Language | Platform of Invoked Program | ||
---|---|---|---|
UNIX® | Windows® 2000/NT/XP | z/OS UNIX System Services or iSeries™ Java | |
Arabic | CSOJ1046 | CSOJ1256 | CSOJ420 |
Chinese, simplified | CSOJ1381 | CSOJ1386 | CSOJ1388 |
Chinese, traditional | CSOJ950 | CSOJ950 | CSOJ1371 |
Cyrillic | CSOJ866 | CSOJ1251 | CSOJ1025 |
Danish | CSOJ850 | CSOJ850 | CSOJ277 |
Eastern European | CSOJ852 | CSOJ1250 | CSOJ870 |
English (UK) | CSOJ850 | CSOJ1252 | CSOJ285 |
English (US) | CSOJ850 | CSOJ1252 | CSOJ037 |
French | CSOJ850 | CSOJ1252 | CSOJ297 |
German | CSOJ850 | CSOJ1252 | CSOJ273 |
Greek | CSOJ813 | CSOJ1253 | CSOJ875 |
Hebrew | CSOJ856 | CSOJ1255 | CSOJ424 |
Japanese | CSOJ943 | CSOJ943 | CSOJ1390 (Katakana SBCS), CSOJ1399 (Latin SBCS) |
Korean | CSOJ949 | CSOJ949 | CSOJ1364 |
Portuguese | CSOJ850 | CSOJ1252 | CSOJ037 |
Spanish | CSOJ850 | CSOJ1252 | CSOJ284 |
Swedish | CSOJ850 | CSOJ1252 | CSOJ278 |
Swiss German | CSOJ850 | CSOJ1252 | CSOJ500 |
Turkish | CSOJ920 | CSOJ1254 | CSOJ1026 |
If you do not specify a value for the conversion table in the linkage options part when you are calling a program from Java, the default conversion tables are those for English (US).
Data conversion of records and structures is based on the declarations of the structure items that lack a substructure.
Data of type CHAR, DBCHAR, or MBCHAR is converted in accordance with the Java conversion tables (for conversion that occurs in an EGL-generated invoker).
No conversion is performed for filler data items (data items that have no name) or for data items of type DECIMAL, PACF, HEX, or UNICODE.
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 data item. 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.
For data items of type BIN, the conversion routine reverses the byte order of the item if the caller or called platform uses Intel® binary format and the other platform does not.
For data items of type NUM or NUMC items, the conversion routine converts all but the last byte using the CHAR algorithm. The sign half-byte (the first half byte of the last byte in the field) is converted according to the hexadecimal values shown in the next table.
EBCDIC for type NUM | EBCDIC for type NUMC | ASCII |
---|---|---|
F (positive sign) | C | 3 |
D (negative sign) | D | 7 |