Close (1)
The Close operation (B_CLOSE) closes the file associated with a specified Position Block and releases any locks your application has executed for the file. Your application should always perform a Close operation when it has finished accessing a file. After a Close operation, your application cannot access the file again until it issues another Open operation (0) for that file.
You can close a file even while inside a transaction. However, the Close operation does not end the transaction; you must explicitly end or abort the transaction. If you abort the transaction, changes made inside the transaction are aborted; if you end the transaction, changes are committed.
*Note: When you close a file inside a transaction, the transactional interface continues to keep an open handle on the file until the transaction is either aborted or ended so that updates to that file can be handled properly. The Position Block for the file is no longer available to your application, however.
Parameters
 
Prerequisites
Procedure
1
2
Result
If the Close operation is successful, the Position Block for the closed file is no longer valid.
If the Close operation fails, the file remains open and the transactional interface returns the following status code:
Positioning
The Close operation destroys both the physical and the logical currency information of the file.