OpenTP1 Version 7 Programming Reference COBOL Language

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

CBLDCDMB('OPEN') - Open a physical file

Format

PROCEDURE DIVISION specification

CALL  'CBLDCDMB'  USING  unique-name-1  unique-name-2

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  FILLER        PIC S9(9) COMP.
    02  data-name-E    PIC S9(9) COMP.
    02  FILLER        PIC S9(9) COMP.
    02  data-name-H    PIC S9(9) COMP.
01  unique-name-2.
    02  data-name-F    PIC X(4) VALUE 'OPEN'.
    02  data-name-I     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('OPEN') opens a physical file created in the OpenTP1 file system. However, it cannot open a physical file being used in online mode.

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-H

Specify the number of blocks collectively processed which is used as an input/output unit.

data-name-F

Specify VALUE 'OPEN' for the request code indicating that the physical file is open.

data-name-I

Specify the type of request (creation output request or re-creation (overwrite) output request). The value specified here determines whether to pad the remaining area with space when the file is closed. The value set here will come into effect when CBLDCDMB('CLOS') call subsequent to CBLDCDMB('PUT ') brings about normal termination. Even though CBLDCDMB('PUT ') is called, the remaining area will not be padded with blocks of null characters provided that UAP processing is terminated without calling CBLDCDMB('CLOS').

VALUE 'I': Creation output request

VALUE 'O': Re-creation output request

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-E

The file descriptor in return for open processing is returned.

Status codes

Status code Explanation
00000 The file descriptor was specified for data-name-E normally.
01607 The memory became insufficient.
01608 The physical file specified for data-name-C is open.
01611 The value specified for data-name-I is invalid.
01614 The physical file name specified is invalid.
01615 The value specified for the number of blocks collectively processed is invalid.
01616 The physical file specified for data-name-C is not a DAM file.
01618 The OpenTP1 file system versions used for creation and allocation do not match each other.
01619 The physical file specified for data-name-C does not exist.
01620 An input/output error occurred.
01628 The access permission for special files has not been granted.
01632 The physical file is not a character special file, or the device corresponding to the special file does not exist.
01633 The physical file specified for data-name-C has not been initialized as an OpenTP1 file system.
01635 The specified value exceeds the maximum number of files which can be opened in the process.
01636 The physical file specified for data-name-C is being used in online mode, or it is being used by another process.
01638 The access permission for physical files has not been granted.
01639 Physical file damage was detected.
01690 The interface code (data-name-A) is invalid.
01691 The request code (data-name-F) is invalid.