For a physical file, use this position to specify the data type of the field within the database.
Specify data type in a logical file only to override or change the data type of the corresponding field in the physical file on which this logical file is based. If you leave this position blank, the field you are defining has the same data type as the corresponding field in the physical file(s) on which the logical file(s) is based.
Valid data type entries are as follows:
Figure 10 and Figure 8 show how to code the data type.
For physical files, if you do not specify a data type or duplicate one from a referenced field, the OS/400 program assigns the following defaults:
Notes:
The following table shows what types of data conversion are valid between
physical and logical files:
| Physical File Data Type | Logical File Data Type | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Character | Hexa- decimal | Zoned | Packed | Binary | Floating Point | Date | Time | Time- stamp | |
| Character | Valid | Valid | See Note 1 | Not valid | Not valid | Not valid | Not valid | Not valid | Not valid |
| Hexa- decimal | Valid | Valid | See Note 1 | Not valid | Not valid | Not valid | Not valid | Not valid | Not valid |
| Zoned | See Note 1 | See Note 1 | Valid | Valid | See Note 2 | Valid | Not valid | Not valid | Not valid |
| Packed | Not valid | Not valid | Valid | Valid | See Note 2 | Valid | Not valid | Not valid | Not valid |
| Binary | Not valid | Not valid | See Note 2 | See Note 2 | See Note 3 | See Note 2 | Not valid | Not valid | Not valid |
| Floating Point | Not valid | Not valid | Valid | Valid | See Note 2 | Valid | Not valid | Not valid | Not valid |
| Date | See Notes 6 and 7 | Not valid | See Note 6 | See Note 6 | Not valid | Not valid | Valid | Not valid | Not valid |
| Time | Not valid | Not valid | See Note 4 | Not valid | Not valid | Not valid | Not valid | Valid | Not valid |
| Time- stamp | Not valid | Not valid | Not valid | Not valid | Not valid | Not valid | See Note 5 | See Note 5 | Valid |
|
Notes:
| |||||||||