OpenTP1 Version 7 Programming Reference COBOL Language
CBLDCDMB('BSEK') - Seek a physical file block
Format
PROCEDURE DIVISION specification
CALL 'CBLDCDMB' 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 'DCDAMINT'.
02 data-name-B PIC X(5).
02 FILLER PIC X(1).
02 data-name-C PIC X(63).
02 FILLER PIC X(3).
02 data-name-H PIC S9(9) COMP.
02 data-name-E PIC S9(9) COMP.
02 FILLER PIC S9(9) COMP.
02 data-name-I PIC S9(9) COMP.
01 unique-name-2.
02 data-name-D PIC X(4) VALUE 'BSEK'.
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.
|
Description
CBLDCDMB('BSEK') specifies a relative block number of the physical file to locate the corresponding block. Call CBLDCDMB('BSEK') after opening a physical file with a re-creation output request.
When the relative block number exists in the file, the relative block number is returned.
When seeking a physical file block, specify the file descriptor returned from CBLDCDMB('OPEN').
Data areas whose values are set in the UAP
data-name-A
Specify VALUE 'DCDAMINT' for the interface code used with the DAM file.
data-name-C
Specify the physical file name which comprises 63 characters (special file name + 14 characters) or less. If the specified physical file name has less than 63 characters, pad the remaining portion with space.
data-name-E
Specify the file descriptor.
data-name-I
Specify the relative block number of the block to be sought.
data-name-D
Specify VALUE 'BSEK' for the request code indicating that a physical file is sought.
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-H
The relative block number of the sought block is returned.
Status codes
| Status code | Explanation |
|---|---|
| 00000 | The relative block number was set to data-name-H normally. |
| 01603 | The file descriptor specified for data-name-E is not the one which was acquired by opening the DAM file normally. |
| The DAM file is not open. | |
| 01605 | The sequence of accessing the DAM file is invalid. |
| 01606 | The relative block number is invalid. |
| 01620 | An output error occurred. |
| 01690 | The interface code (data-name-A) is invalid. |
| 01691 | The request code (data-name-D) is invalid. |
All Rights Reserved. Copyright (C) 2006, 2010, Hitachi, Ltd.