CBLDCDMB('GET ') - Input 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  data-name-G    PIC S9(9) COMP.
   02  FILLER        PIC X(4).
01  unique-name-2.
   02  data-name-D    PIC X(4) VALUE 'GET '.
   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-F    PIC X(n).

Description

CBLDCDMB('GET ') sequentially inputs data in blocks from a physical file of the OpenTP1 file system. Input the physical file block after opening the physical file.

If the value specified for the block length is smaller than the value specified for the buffer length, the length of the input block is returned to data-name-H. If the value specified for the block length is greater than the value specified for buffer length, an error is returned.

When inputting a physical file block, specify the physical file name and 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, with a path name which comprises 63 characters (special file name + 14 characters) or less. If the physical file name comprises less than 63 characters, pad the remaining portion with space.

data-name-E

Specify the file descriptor.

data-name-G

Specify the length of the input buffer.

data-name-D

Specify VALUE 'GET[Figure]' for the request code indicating the input of a block from the physical file.

data-name-F

Specify the input buffer.

data-name-Z

Specify 0.

Data areas to which values are returned from OpenTP1

data-name-B

A status code of 5 digits is returned.

data-name-H

The length of the input block is returned.

Status codes

Status codeExplanation
00000The input block length was specified for data-name-H normally.
01603The file descriptor specified for data-name-E is not the one which was acquired by opening the file normally.
The DAM file is not open.
01604The value specified for the block length is greater than the value specified for the buffer length.
01605The sequence of accessing the DAM file is invalid.
01620An input error occurred.
01628The DAM file to be accessed is protected by the security facility. The UAP attempting to input a physical file block has no access permission.
01637The file end was reached.
01646The DAM file to be accessed is protected by the security facility. No ACL exists for the file.
01690The interface code (data-name-A) is invalid.
01691The request code (data-name-D) is invalid.