OPEN DATASET - CODE PAGE
7.31 | 7.40 | 7.54
... CODE PAGE cp ...
This addition specifies that the representation of character-like data objects in the file is based
on the code page specified in
cp. When a character-like data object is written
or read, a conversion between this code page and the current character representation is performed,
if necessary. If the addition is not specified, the data is read or written in a non-Unicode system
without conversion. In a Unicode system, the characters of the file are treated in accordance with the
non-Unicode code page that would be assigned at the time of read/write in a non-Unicode system (in accordance with the entry specified in the database table TCP0C of the current
The code page specification
cp expects a character-like data object that
must contain, when the statement is executed, the name of a non-Unicode page from the column CPCODEPAGE in the database table TCP00. You must not specify a Unicode code page.
- In Unicode systems, this addition enables the automatic conversion of file content to the current character format when reading and writing files. In this way, files saved in non-Unicode systems can be imported into Unicode systems.
SET DATASETcan be used to specify a different code page for an opened legacy file.
CODE PAGEreplaces the use of the obsolete statement
TRANSLATE CODE PAGEin when accessing files.