Version 7.4.4
 —  Utilities  —

ENCODEF: Change File Encoding

graphics/util_adadbs_encodef.png

This document covers the following topics:


Essential Parameter

FILE: File Number

FILE is the number of the file for which encoding is to be changed.

FACODE: Encoding for Alphanumeric Fields in File

The FACODE parameter defines the encoding for alphanumeric fields stored in the file. It can be applied to files already loaded. The encoding must be derived from EBCDIC encoding; that is, X'40' is the space character. Double-byte character set (DBCS) type encodings are supported with the exception of DBCS-only. See Supplied UES Encodings for a list of supplied code pages.

FACODE and UWCODE are mutually exclusive parameters; if one is specified, the other should not be. But one of them must be specified.

UWCODE: User Encoding for Wide-Character Fields in File

The UWCODE parameter defines the user encoding for wide-character fields stored in the file. It can be applied to files already loaded. Note that the wide file encoding is not changed.

To change the encoding of wide-character fields, the file must be unloaded, decompressed, compressed, and reloaded. See Supplied UES Encodings for a list of supplied code pages.

FACODE and UWCODE are mutually exclusive parameters; if one is specified, the other should not be. But one of them must be specified.

Top of page

Optional Parameters

NOUSERABEND: Termination Without Abend

When an error is encountered while the function is running, the utility prints an error message and terminates with user abend 34 (with a dump) or user abend 35 (without a dump).

If NOUSERABEND is specified, the utility will not abend after printing the error message. Instead, the message "utility TERMINATED DUE TO ERROR CONDITION" is displayed and the utility terminates with condition code 20.

TEST: Test Syntax

The TEST parameter tests the operation syntax without actually performing the operation. Only the syntax of the specified parameters can be tested; not the validity of values and variables. See Syntax Checking with the TEST Parameter for more information about using the TEST parameter in ADADBS functions.

Top of page

Example

In the following example, ADADBS ENCODEF is used to change the encoding of alphanumeric fields in file 1425 to use code page 285 (CECP: United Kingdom, EBCDIC-compatible with X'40' fill character). In file 401, ADADBS ENCODEF is used to change the encoding of wide fields to use code page 3396 (IBM, CCSID 4396, Japanese host double byte including 1880 user-defined characters). Note that because UWCODE is changing, file 401 must be unloaded, decompressed, compressed, and reloaded.

ADADBS ENCODEF FILE=1425,FACODE=285
ADADBS ENCODEF FILE=401,UWCODE=3396

Top of page