OpenTP1 Version 7 Programming Guide

[Contents][Index][Back][Next]

4.1.3 Outline of access to DAM files

This subsection explains how to access DAM files. There are two types of DAM files:

Hereafter, the explanations of the facilities specific to recoverable DAM files are given under the heading "Recoverable DAM files". For details on unrecoverable DAM files, see 4.1.8 Access to unrecoverable DAM files.

Organization of this subsection
(1) Procedure for access to DAM files
(2) Notes on opening DAM files
(3) Notes on receiving blocks from DAM files
(4) Access to DAM files outside the transaction processing range (recoverable DAM files)
(5) Transaction range for access to DAM files (recoverable DAM files)
(6) Notes on access to DAM files exceeding 2 gigabytes

(1) Procedure for access to DAM files

When a UAP uses a DAM file, the UAP accesses the file with the following procedure:

  1. Open the file.
  2. Perform one of the following processes:
    Data input (reference), data input and updating, and data output.
  3. Close the file.

(2) Notes on opening DAM files

The function to open a DAM file must be called from each UAP that will use the DAM file. Even if more than one UAP belongs to one global transaction, each of the UAPs must call the function to open the DAM file.

(3) Notes on receiving blocks from DAM files

DAM file blocks can be received without the specification of locking if the purpose of input is reference. If blocks are received without the specification of locking, the input blocks may not be up-to-date because other UAPs may update the blocks during the input processing.

(4) Access to DAM files outside the transaction processing range (recoverable DAM files)

Processes outside the transaction range (before the transaction starts or after the acquisition of the synchronization point) can only receive blocks by accessing them for a reference purpose. Blocks cannot be locked.

(5) Transaction range for access to DAM files (recoverable DAM files)

When DAM files are accessed, they are locked and unlocked for each transaction branch or for each global transaction. For details on locking of DAM files, see 4.1.7 Locking DAM files.

(6) Notes on access to DAM files exceeding 2 gigabytes

You cannot use DAM input or output functions (dc_dam_get, dc_dam_put, dc_dam_read, dc_dam_rewrite, dc_dam_write, CBLDCDMB('GET'), CBLDCDMB('PUT'), CBLDCDMB('READ'), CBLDCDMB('REWT'), and CBLDCDMB('WRIT')) to input or output DAM file data exceeding 2 gigabytes at one time. If you attempt to use one of these functions to input or output DAM file data exceeding 2 gigabytes, the function will return with a DCDAMER_BUFFER or 01604 error.