Using the force-end-of-data operation

 

The force-end-of-data (FEOD) operation allows you to force all changes that were made to a file by your program to auxiliary storage. It also allows you to position the read operation to either the beginning or the end of a file if the file is open for input operations.

Normally, the system determines when to force changes to auxiliary storage. However, you can use the FEOD operation to ensure that all changes are forced to auxiliary storage.

*START sets the beginning or starting position in the database file member currently open to just before the first record in the member (the first sequential read operation reads the first record in the current member). If MBR(*ALL) processing is in effect for the Override with Database File (OVRDBF) command, a read previous operation gets the last record in the previous member. If a read previous operation is done and the previous member does not exist, the end of file message (CPF5001) is sent. *END sets the position in the database file member currently open to just after the last record in the member (a read previous operation reads the last record in the current member). If MBR(*ALL) processing is in effect for the OVRDBF command, a read next operation gets the first record in the next member. If a read next operation is done and the next member does not exist, the end of file message (CPF5001) occurs.

If the file has a delete trigger, the force-end-of-data operation is not allowed. If the file is part of a referential parent relationship, the FEOD operation is not allowed.

See your high-level language topic collection for more information about the FEOD operation (some high-level languages do not support the FEOD operation).

 

Parent topic:

Adding database records

 

Related concepts


Triggering automatic events in your database
Ensuring data integrity with referential constraints