OpenTP1 Version 7 Programming Reference C Language

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

dc_dam_hold - Shut down a logical file

Format

ANSI C, C++

#include <dcdam.h>
int  dc_dam_hold (char *lfname, DCLONG flags)

K&R C

#include <dcdam.h>
int  dc_dam_hold (lfname, flags)
char     *lfname;
DCLONG   flags;

Description

The function dc_dam_hold() shuts down a logical file. After the function dc_dam_hold() is executed, a logical shutdown error is always returned if another UAP calls an access request for the logical file.

Arguments whose values are set in the UAP

lfname

Within 1 to 8 bytes, specify the name of a logical file to be shut down.

flags

Specify DCNOFLAGS.

Return values

Return value Return value (numeric) Explanation
DC_OK 0 The logical file specified for lfname was shut down normally.
DCDAMER_PROTO -1600 The function dc_rpc_open() is not called.
N is specified for atomic_update in the user service definition. (This value is returned only when a recoverable DAM file is accessed.)
The function dc_dam_start() is not called. (This value is returned only when an unrecoverable DAM file is accessed.)
The UAP is incorrectly linked as follows:
  • The library (-1tdam) to be used for access to a TAM file using a DAM service function is linked incorrectly.
  • The definition of the resource manager for transaction control object files is incorrect.
DCDAMER_UNDEF -1601 The specified logical file name has not been defined.
DCDAMER_NOMEM -1607 The memory became insufficient.
DCDAMER_PARAM_LFNAME -1610 The logical file name specified for lfname is invalid.
DCDAMER_PARAM_FLAGS -1611 The value specified for flags is invalid.
DCDAMER_VERSION -1618 The version of the DAM library linked to the UAP does not allow the UAP to operate with the current DAM service.
DCDAMER_LHOLDED -1625 The logical file name specified for lfname is in logical shutdown state.
DCDAMER_OHOLDED -1626 The logical file name specified for lfname is in shutdown state due to an error.
DCDAMER_ACCESS -1628 A DAM file to be shut down is protected with the security facility. The UAP that called the function dc_dam_hold() has no access permission.
DCDAMER_NO_ACL -1646 A DAM file to be shut down is protected with the security facility. There is no ACL for the corresponding file.