OpenTP1 Version 7 Programming Reference COBOL Language
CBLDCDAM('STAT') - Reference the status of a logical file
Format
PROCEDURE DIVISION specification
CALL 'CBLDCDAM' USING unique-name-1 unique-name-2 unique-name-3 |
DATA DIVISION specification
01 unique-name-1. 02 data-name-A PIC X(8) VALUE 'DCDAMSVC'. 02 data-name-B PIC X(5). 02 FILLER PIC X(3). 02 data-name-C PIC X(8) COMP. 02 data-name-E PIC S9(9) COMP VALUE ZERO. 02 data-name-F PIC S9(9) COMP. 02 data-name-G PIC S9(9) COMP. 02 FILLER PIC S9(9) COMP. 02 data-name-H PIC X(1). 02 data-name-I PIC X(1). 02 data-name-J PIC X(1). 02 FILLER PIC X(1). 02 FILLER PIC X(20). 01 unique-name-2. 02 data-name-D PIC X(4) VALUE 'STAT'. 02 FILLER PIC X(1). 02 FILLER PIC X(1). 02 FILLER PIC X(1). 02 FILLER PIC X(1). 02 data-name-Z PIC S9(9) COMP VALUE ZERO. 01 unique-name-3. 02 data-name-K PIC X(64). |
Description
CBLDCDAM('STAT') returns the current status of a logical file. The contents to be returned are shown below:
The status of a logical file can be referenced whether the logical file is opened or not.
When referencing the status of a logical file, specify the logical file name.
Data areas whose values are set in the UAP
data-name-A
Specify VALUE 'DCDAMSVC' for the interface code used with the DAM file.
data-name-C
Specify a logical file name with up to 8 characters. If the specified logical file name comprises less than 8 characters, pad the remaining portion with space.
data-name-E
Specify 0.
data-name-D
Specify VALUE 'STAT' for the request code indicating the reference of the status of a logical file.
data-name-Z
Specify 0.
Data areas to which values are returned from OpenTP1
data-name-B
The status code of 5 digit is returned.
data-name-F
Block length of a logical file is returned.
data-name-G
The number of blocks of a logical file is returned.
data-name-H
The current status of a logical file is set to one of the following values:
VALUE 'N' ... The logical file is accessible.
VALUE 'L' ... The logical file is in logical shutdown state.
VALUE 'O' ... The logical file is in shutdown state due to an error.
VALUE 'H' ... The logical file is requested to be shut down.
data-name-I
The attribute of a logical file specified in the DAM service definition is set to one of the following values:
VALUE 'Q' ... The DAM file is not a target for deferred update processing.
VALUE 'D' ... The DAM file is a target for deferred update processing.
VALUE 'N' ... The DAM file is unrecoverable.
VALUE 'C' ... Unrecoverable DAM file specified by a cache-less access.
data-name-J
The security attribute of a logical file specified in the DAM service definition is set to one of the following values:
VALUE 'N' ... Security is not required.
VALUE 'S' ... Security is required.
data-name-K
A physical file name corresponding to the logical file is set here.
Status codes
Status code | Explanation |
---|---|
00000 | The status of the logical name was set to data-name-H normally. |
01600 | CBLDCRPC('OPEN ') was not called. |
'N' is specified for atomic_update in the user service definition. (This error is returned only when accessing a recoverable DAM file.) | |
CBLDCDAM('STRT') was not called. (This error is returned only when accessing an unrecoverable DAM file.) | |
01601 | The logical file name specified for data-name-C has not been defined. |
01607 | The memory became insufficient. |
01610 | The logical file name specified for data-name-C is invalid. |
01611 | The value specified for data-name-E is invalid. |
01612 | The value set to a data name to which a value is returned from OpenTP1 is invalid or not a space. |
01618 | The version of the DAM library linked to the UAP does not allow the UAP to operate with the current DAM service. |
01628 | The DAM file of which the status was attempted to be referenced is protected by the security facility. The UAP that called CBLDCDAM('STAT') has no access permission. |
01646 | The DAM file of which the status was attempted to be referenced is protected by the security facility. No ACL exists for the file. |
01690 | The interface code (data-name-A) is invalid. |
01691 | The request code (data-name-D) is invalid. |
Note
When referencing the status of a DAM file, the DAM service applies lock to get information. Therefore, frequent calls of CBLDCDAM('STAT') may decrease throughput due to the waiting time for release from lock. Hold the frequency of referencing the status of a DAM file in online mode to a minimum.
All Rights Reserved. Copyright (C) 2006, 2010, Hitachi, Ltd.