17.6.2 Coding rules for input data (fixed-length format)
-
The length of a row of input data must be fixed.
-
A line break code can be entered at the end of a row.
-
Create input data files using the character encoding specified in the ADBLANG environment variable.
-
Use uniform start positions for all column values. The following table explains how to make the start position uniform for each data type.
Table 17‒15: How to make the start positions uniform No.
Data type
Method for making start positions uniform
Handling of spaces and tabs
1
Numeric data
Use one of the following methods to set the start position (methods 2 and 3 can both be used at the same time):
-
Fill data with leading or trailing spaces (x20).
-
Fill integer data with leading zeros.
-
Fill decimal data with trailing zeros.
Before data is stored, any unneeded spaces (0x20) and tabs (0x09) are deleted.#1
2
Character string data
Fixed length
--
--
3
Variable length
Fill data with trailing spaces (x20) to make start positions uniform.
Before data is stored, any trailing spaces (0x20) and tabs (0x09) are deleted.#2
4
Datetime data
Fill data with leading or trailing spaces (x20) to make start positions uniform.
Before data is stored, any unneeded spaces (0x20) and tabs (0x09) are deleted.#1
5
Binary data
Fixed length
Fill data with leading or trailing spaces (x20) to make start positions uniform.
Before data is stored, any unneeded spaces (0x20) and tabs (0x09) are deleted.#1
6
Variable length
Fill data with leading or trailing spaces (x20) to make start positions uniform.
Before data is stored, any unneeded spaces (0x20) and tabs (0x09) are deleted.#2
- Legend:
-
--: Not applicable.
- #1
-
If all the data is deleted, the input data becomes invalid.
- #2
-
If all the data is deleted, it is treated as data with a length of zero.
-