Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (S)
Guardian Procedure Calls Reference Manual522629-013
14-96
SETMODE Procedure
149 Disk: Alternate key insertion locking. Note that this operation is not
supported for queue files.
param1 = 0 no automatic locking (default): locking and unlocking
during insertion is not automatically performed.
= 1 automatic locking: writes of record with alternate keys
are locked at the beginning of insertion and unlocked
after all associated alternate key record insertions are
complete. This prevents interference from programs
attempting concurrent update of the same record.
param2 must be zero if supplied.
SETMODE 149 is not valid (nor needed) for audited files. For process pairs,
the mode needs to be set in the backup by CHECKSETMODE. If the file is a
key-sequenced file using the generic locks feature, the lock established by
automatic locking might not be released automatically at the end of the write
processing.
152 Disk: Reduce the overhead of multiple closes of a file that has multiple
openers by flushing the cache on the last close of the file.
param1.<15> = 1 for nonaudited disk files, causes the cache not to be
flushed unless the file is closed by the last opener with
either write access or a nonzero sync-depth value. To
be effective, SETMODE 152 with
param1.<15> = 1
should be performed for each open of a file.
= 0 causes the cache to be flushed when this opener closes
the file, if the file is opened for write access. The
default action is to flush the cache only when the last
write-access opener closes the file.
param1.<15> = 1
disables the effect of SETMODE 152 with
param1.<15>
= 0.
param2 is not used with function 152. If it is supplied, it must be 0.
SETMODE 152 with
param1.<15> = 1 postpones the flush of the cache until
the last opener with either write access or a nonzero sync-depth value closes
the file. For example, an application can control cache flushing by creating a
persistent opener and closing the file when more system resources are
available.
For optimal performance, do not use SETMODE 152 with
param1.<15> = 1 if
the file is closed by all openers at about the same time, because all buffers in
the cache are closed serially by the last opener rather than in parallel by
each opener.
Table 14-4. SETMODE Functions (page 29 of 34)
function Parameters and Effect