Previous Topic

Next Topic

Book Contents

Book Index

Media Database Error Handling Routine

The calling program must supply an error handling routine. This error handling routine is given control whenever the CTTCHKDB macro determines that the last access to the Media Database was unsuccessful (for example, the requested volume was not found).

High level API invokes the CTTIOS macro to access the Media Database. For more information, see Macro CTTIOS.

High level API accesses a set of variables generated by the CTTADBP macro. Some of these variables contain information relevant to the Media Database error handling routine. The variables are located in the area specified using the PARMS parameter to the CTTACCDB macro, and are mapped by the CTTADBP macro. The following table describes these variables:

Table 253 Variables Generated by Macro CTTADBP, Accessible by High Level APIs

Variable

Description

ADBPRC

 

Return code from the last high level API function. Full word. Possible values are

  • 0—OK
  • 8—invalid function requested
  • 12—Control‑M/Tape TCT not found (that is, Control‑M/Tape not active)
  • 16—a CTTIOS command failed (see variables ADBPIRC and ADBPIRSN in this table)
  • 20—internal error (CTTIOS handle not supplied)
  • 24—Media Database record not supplied
  • 28—calling program is not APF-authorized
  • 32—key (volser) not supplied
  • 36—function code not allowed (denied by Exit CTTX006)

ADBPFUNC

Last CTTACCDB function. The field for this variable is eight characters long.

ADBPIRC

 

Return code from the last run of the CTTIOS macro that was invoked by the high level API. Full word. (For more details on the return codes of the CTTIOS macro, see the CTT200S message in the INCONTROL for z/OS Messages Manual.)

ADBPIRSN

 

Reason code returned from the last run of the CTTIOS macro invoked by the high level API. Full word. (For more information on the reason codes of the CTTIOS macro, see the CTT200S message in the INCONTROL for z/OS Messages Manual.)

ADBPIOPR

Last CTTIOS function issued by the high level interface. This variable is contained in an 8‑character field.

Parent Topic

High Level API