Previous Topic

Next Topic

Book Contents

Book Index

The CTTACCDB Macro

High level API access to the Media Database is performed using the CTTACCDB macro.

Format

Instructions for the CTTACCDB macro are formatted as follows:

label     CTTACCDB        function‑code,

                          R  EC=buffer‑address,

                          VOL=volser,

                          PARMS=parm-work-area

Table 251 Parameters

Parameter

Description

function‑code

Specifies a function requested from the CTTACCDB macro. Mandatory. This parameter must always be the first parameter.

START

Performs initialization functions required to enable access to the Media Database of Control‑M/Tape (for example, gain access to the real-time environment TCT, and open the real-time environment Media Database).

END

Performs cleanup functions after using high level API (for example, close the Media Database).

READVOL

 

Reads a volume record from the Media Database.

A buffer-address, a volser, and a parm-work-area must be specified with this function code.

ADDVOL

 

Adds a volume record to the Media Database.

A buffer‑address and a parm-work-area must be specified with this function code.

DELVOL

 

Deletes a volume record from the Media Database.

A volser and a parm-work-area must be specified with this function code.

UPDTVOL

 

Updates a volume record in the Media Database.

A buffer‑address and a parm-work-area must be specified with this function code.

buffer-address

 

Specifies a buffer used by the CTTACCDB macro for either storing data retrieved from the Media Database, or storing data to be inserted in the Media Database. This variable must point to an area defined as follows:

REC   DS (DVLLEN)X

This parameter is mandatory when function-code READVOL, ADDVOL or UPDTVOL is specified.

volser

 

Specifies a volume serial number. This variable must point to an area six characters in length. This variable is mandatory when function-code READVOL or DELVOL is specified.

parm-work-area

 

Specifies a macro invocation work area. Mandatory. This variable must point to an area defined as follows:

ADBPARMS DS (ADBPLEN)X

All invocations of the CTTACCDB macro must access the same parameter area. Therefore, you must use the same parm-work-area in all calls to the CTTACCDB macro.

The CTTACCDB macro must be coded in accordance with all standard macro assembler coding restrictions.

Values in general purpose registers 0, 1, 14, and 15 are modified by the CTTACCDB macro.

The CTTACCDB macro accesses a set of variables generated by macro CTTADBP and by the CTTDBTP macro. Therefore, the source of the calling program must include both these macros.

Parent Topic

High Level API