CBLDCDAM('END ') - Terminate using an unrecoverable DAM 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  FILLER       PIC X(8).
   02  FILLER       PIC S9(9) COMP.
   02  FILLER       PIC S9(9) COMP.
   02  FILLER       PIC S9(9) COMP.
   02  FILLER       PIC X(28).
01  unique-name-2.
   02  data-name-C    PIC X(4) VALUE 'END '.
   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

CBLDCDAM('END ') declares that use of an unrecoverable DAM file is terminated.

Call CBLDCDAM('END ') whenever calling CBLDCDAM('STRT'). Otherwise, the resource used to access an unrecoverable DAM file remains unreleased until the UAP terminates.

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 VALUE 'END[Figure]' for the request code indicating that use of an unrecoverable DAM file is terminated.

data-name-Z

Specify 0.

Data area to which a value is returned from OpenTP1

data-name-B

The status code of 5 digit is returned.

Status codes

Status codeExplanation
00000Normal termination. Use of an unrecoverable DAM file is terminated.
01600CBLDCRPC('OPEN ') was not called.
01605CBLDCDAM('STRT') was not called.
01690The interface code (data-name-A) is invalid.
01691The request code (data-name-C) is invalid.