Nachtrag:
DATABASE-MYFILE-ALWNULL

Bei allen READ-WRITE's muss dann mit "NULL-MAP IS MYNULLFIELDS" ergänzt werden.

Beispiel:
FILE-CONTROL.

SELECT FILE-1 ASSIGN to DATABASE-FILE1-ALWNULL

ACCESS is DYNAMIC RECORD KEY IS FULL-PRODUCT-CODE IN FILE-1

ORGANIZATION IS INDEXED.

START Statement

Chapter 14. Part 6. Procedure Division
481

FD FILE-1.

01 FULL-PRODUCT-CODE.

05 TYPE-CODE PIC X(2).

05 COLOR-CODE PIC X(2).

05 LOCATION-CODE PIC X(2).

WORKING-STORAGE SECTION.

01 FILE1-N.

05 FULL-PRODUCT-CODE-NKM.

06 FILLER PIC X VALUE ZERO.

06 COLOR-CODE-NF PIC 1 VALUE B"0".

06 LOCATION-CODE-NF PIC 1 VALUE B"0".

Fields 2 and 3 are null-capable, where ’-’ indicates null, and xx indicates any value.

The following are representations of the records in the file:

NN----

NN--xx

NNxx--

Consider the following START statement:

START FILE-1

NULL-KEY-MAP IS FULL-PRODUCT-CODE-NKM

INVALID KEY DISPLAY "No data in system for product code " TYPE-CODE

GO TO ERROR-ROUTINE

END-START.

If the null-key-map in the START statement has a value of
010, the pointer is set to

point to the record with the key
NN--xx. If the null-key-map in the START

statement has a value of
011, the pointer is set to point to the record with the key

NN----
.

For more information about using null-capable fields, refer to the
IBM Rational

Development Studio for i: ILE COBOL Programmer’s Guide
.

End of IBM Extension