Previous Topic: Error ExpressionsNext Topic: Status Definition Records


The ALLOWING Clause

Purpose

The ALLOWING clause is used to allow the dialog to receive status codes not allowed by the autostatus facility.

Syntax

►►─── ALLOWing error codes ───────────────────────────────────────────────────►

     ┌─────────────────────────────── , ───────────────────────────────────┐
 ►─(─▼─┬─ error-status-code-name ────────────────────────────────────────┬─┴)─►◄
       └─ 'error─status─code'───┬──────────────────────────────────────┬─┘
                                └─┬─ THROUGH ─┬── 'error-status-code' ─┘
                                  └─ THRU ────┘

Parameters

error-status-code-name

Specifies a level-88 condition name defined in the dialog's status definition record.

Multiple status code and condition name specifications must be separated by commas or blanks.

'error-status-code'

A 4-digit number enclosed in single quotation marks that identifies a status code applicable to the process command.

THROUGH 'error-status-code'

Specifies a status code or range of status codes.

THRU can be used in place of THROUGH.

Usage

An error expression is coded in the form of an ALLOWING clause in any of the following commands:

An ALLOWING clause overrides the autostatus facility. The values normally allowed by autostatus, with the exception of 0000, are returned only if explicitly named.

Nonzero status codes returned to a dialog are checked against the specified values. If the status code matches any of the specified values, processing continues. If the status code does not match any of the specified values, the CA ADS runtime system terminates the application thread.

The ALLOWING clause is useful to check for deadlock conditions.

The examples below illustrate the ALLOWING clause in two database access commands.

Example 1: Specification of a range of allowable error codes

MODIFY ORDOR ALLOWING ERROR CODES ('0801' THRU '0850').

Example 2: Specification of a site-defined level-88 status code

FIND CUST-NUM ALLOWING (ANY-ERROR).

ANY-ERROR is a level-88 condition name in a site-defined status definition record. See the discussion of status definition records that follows this example.