IBM Books

Null indicator

A null indicator is a column (by byte position) in a nondelimited ASCII file that contains the null indicator flag for the data being loaded into a table column. The null indicator can be any valid positive integer. A null indicator of zero (0) indicates that the table column cannot be NULL.

When the load process looks at each data row, the character in the null indicator column indicates whether or not the data in the column defined by the start and end positions is NULL. Unless otherwise specified, a 'Y' is used to denote that the data column is NULL. Anything else indicates that the data column is not NULL. For example, when loading the following ASC file into a table with columns COL1, COL2, and COL3:

3         4         5         6
0.........0.........0.........0
Smith,B.      4973 N15.46
Jones,S.     12345 Y
Davis,S.    452121 N93.78

For rows 1 and 3, an N is in position 49, indicating that the data in COL3 for those rows is not NULL. For row 2, a Y is in position 49, indicating that the data in COL3 for row 2 is NULL.

[ Top of Page | Table of Contents | Glossary | Index ]

[ DB2 List of Books | Search the DB2 Books ]