Specifying Data or Character Set Translations

Normally DUMPALL does not perform data or character translation when it copies a file while it executes a COPY or a CAT command. The only translations that DUMPALL normally performs when it executes a LIST command are those required by formats or fields you specify and those required by the default print options or the print options you specify.

DUMPALL can perform data or character-set translations if you explicitly specify values for the INTMODE file attribute, the EXTMODE file attribute, or both.

Character set translations can occur in three places:

  • When DUMPALL is reading the input file, logical I/O can perform data translation if the INTMODE and EXTMODE attributes of the input file are not equal to each other.

  • When DUMPALL is copying data from the input buffer to the output buffer, DUMPALL can perform data translation if the INTMODE value of the input file is not equal to the INTMODE value of the output file.

  • When DUMPALL is writing to the output file, logical I/O can perform data translation if the INTMODE and EXTMODE attributes of the output file are not equal to each other.

You must be careful whenever you specify values for INTMODE or EXTMODE for the input file or the output file. If the records in the input file contain nontext data, such as decimal or integer numbers (COMP), real or floating point numbers (COMP-2), or other binary or numerical information, you probably should not let DUMPALL perform any data translations. If DUMPALL or logical I/O translate numerical fields in the input records, that data might not be usable or correct in the output records.

By default, DUMPALL sets the INTMODE of the input file, the INTMODE of the output file, and the EXTMODE of the output file all equal to the EXTMODE value of the input file. So, by default, DUMPALL does not perform data translations.

You can invoke and control data translations by using the following file attributes:

File Attribue

Function

TRANSLATION

By default, DUMPALL sets TRANSLATE to FULLTRANS for both the input file and the output file. If the INTMODE and the EXTMODE attributes of an input or output file differ, logical I/O can translate the data in the records.

INTMODE

INTMODE is not a permanent file attribute that is saved in the label information for the file. Logical I/O uses the INTMODE values set by you or by DUMPALL as one of the factors in determining whether it should translate the data in the records.

By default, DUMPALL sets the INTMODE value of the input file equal to the EXTMODE value of the input file; by default, DUMPALL sets the INTMODE value of the output file equal to the INTMODE value of the input file.

For a COPY or CAT command, DUMPALL compares the INTMODE value of the input file with the INTMODE value of the output file. If the values differ, DUMPALL can translate the data in each record when it copies the data from the input buffer to the output buffer.

EXTMODE

EXTMODE is a permanent file attribute that is stored in the label information of labeled files. Logical I/O compares the EXTMODE value of a file with the INTMODE value set by DUMPALL. If the values differ, logical I/O can perform data translations when DUMPALL reads from or writes to that file.

DUMPALL uses any value you specify for the EXTMODE attribute of an input file only if the input file is unlabeled.

By default, DUMPALL sets the EXTMODE value of the output file equal to the EXTMODE value of the input file.

OVERRIDEEXTMODE

OVERRIDEEXTMODE gives greater flexibility in character translation situations, or when processing labeled tapes with varying formats.

When OVERRIDEEXTMODE has a valid value other than the default value of never (0), it will be listed in the file attributes list of the associated file.

CCSVERSION

The CCSVERSION file attribute is stored in the label information for disk files only. The CCSVERSION attribute does not affect data translations directly. But you should know that when DUMPALL copies from an input disk file to an output disk file, DUMPALL sets the CCSVERSION value of the output file equal to the value of the input file unless you do one of the following:

  • Explicitly specify CCSVERSION for the output file.

  • Explicitly specify the INTMODE or EXTMODE value of the output file.

The previous descriptions explain that when modes differ, data translations can occur. For each of the three possible translations, whether or not a translation takes place depends on the exact value of the two modes involved and is determined as follows:

  • If the two modes are the same, no translations occur.

  • If one mode is SINGLE (word) and the other mode is HEX, EBCDIC, or ASCII, no translations occur.

  • If one mode is HEX, EBCDIC, or ASCII, and the other mode differs but is also either HEX, EBCDIC, or ASCII, translations occur.

  • Otherwise, the translation that occurs is determined by a procedure in the CENTRALSUPPORT library called CCSTOCCS_TRANS_TABLE. If a transliteration table is available for converting characters between the two coded character sets specified by the two modes, translation occurs; if no transliteration table exists, DUMPALL reports an error. For more information, refer to the MultiLingual System (MLS) Administration, Operations, and Programming Guide.