Internal and External Formats

Numeric, character, date, time, and timestamp fields have an internal format that is independent of the external format. The internal format is the way the data is stored in the program. The external format is the way the data is stored in files.

You need to be aware of the internal format when:

In addition, you may want to consider the internal format of numeric fields, when the run-time performance of arithmetic operations is important. For more information, see Performance Considerations.

There is a default internal and external format for numeric and date-time data types. You can specify an internal format for a specific field on a definition specification. Similarly, you can specify an external format for a program-described field on the corresponding input or output specification.

For fields in an externally described file, the external data format is specified in the data description specifications in position 35. You cannot change the external format of externally described fields, with one exception. If you specify EXTBININT on a control specification, any binary field with zero decimal positions will be treated as having an integer external format.

For subfields in externally described data structures, the data formats specified in the external description are used as the internal formats of the subfields by the compiler.



[ Top of Page | Previous Page | Next Page | Contents | Index ]