All strings are always interpreted and processed in a character set.
However, different character sets can be used. For example, data can be present in a file in one character set, be stored in a different character set in the work file and be displayed in a different character set again.
If necessary, in such cases, the string can be converted from the source into the target character set. Thus, for example, a file which is present in the character set EDF03IRV
can be read into a work file in the character set UTF16
and displayed in UTFE
at a Unicode terminal. It is then possible to insert any required characters (from the set of those available).
For logging purposes, the file can also be output to SYSLST
using the character set EDF041
.
The following table indicates how EDT determines the character set to be used in each case.
Source/target | Character set for the string |
Input/output at a terminal | Communications character set |
Reading from | Character set assigned to |
Reading from a work file | Character set for the work file |
Writing to a work file | Character set for the work file. If |
Reading from a string variable | Character set for the string variable. |
Writing to a string variable | When a new string variable is created, character set in the |
S variables or job variables | Character set from the |
Executing an @INPUT | Character set of the file which contains the @INPUT |
Executing a @DO | Character set of the work file which contains the @DO |
Inserting from a DMS file or a | Character set from the file's catalog entry. If |
Source/target | Character set for the string |
Writing to a DMS file or a | If a new file is created, character set from the |
Reading and writing from/to a | Character set from the |
Writing to | Character set assigned to |
Writing to | Character set assigned to |
In the case of some statements (e.g. @CREATE, @SETJV), it is possible to specify multiple character sets which are initially joined in an intermediate result.
If all the strings involved have the same character set then this is also the character set of the intermediate result. If the involved strings have different character sets then the character set of the intermediate result is UTFE
.
This intermediate result is then converted into the target character set.