ILE COBOL Programmer's Guide

Input/Output Considerations for Distributed Files

The following considerations apply to input/output operations for distributed files:

Example of How Records are Retrieved for Insert, Update, and Delete

Figure 129 shows the different record positions for a distributed file after the first get-by-key request in buffered retrieval. This get-by-key request has positioned the distributed file at the first record on each node.

Figure 129. First Duplicate Record Key Positions Across Nodes in a Distributed File



an illustration of the text, described below

In this example, the first get-by-key request has returned record A to your program. Because of the different record positions on the different nodes, subsequent get-by-key-next requests would not return records that had been inserted or updated on node 1 that preceded either Record H on Node 1 or Record I on Node 3. An inserted or updated record that comes after the last record returned to your program, but before the current key position for a particular node, will not be seen by your program unless the direction in which you are reading records is changed.

Records that have been deleted may also be seen by your program if they have already been positioned to and retrieved from a particular node. For example, if Record A from Node 2 has been returned to your program, Record I from Node 3 will be returned to your program even if it has been deleted prior to issuing the next get-by-key-next request set to retrieve it.

When non-buffered retrieval (*CURRENT) is being used, records that are inserted or updated in the distributed file after the open will be retrieved in the same way as they would have been for a non-distributed database file, except for duplicate key values that span nodes. Records that are inserted or updated in a distributed file after it has been opened for non-buffered retrieval also might not be seen if its key value comes before the last record that has been returned to your program. If you require that the keyed sequence input to your distributed file retrieves the same records that would have been retrieved for a non-distributed database file, except for duplicate key values that span nodes, then you should override the open of your keyed distributed file to non-buffered retrieval.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]