ONCONDCOND Function

Purpose

Returns a non-varying character string whose value is the name of the condition for which a CONDITION condition is raised.

Syntax

ONCONDCOND()

or

ONCONDCOND

Description

ONCONDCOND returns a non-varying character string whose value is the name of the condition for which a CONDITION condition is raised. It is considered in context in the following situations:

  • In a CONDITION ON-unit, or any of its descendants
  • In an ANYCONDITION ON-unit that traps a CONDITION condition, or any descendants of such an ON-unit.

If ONCONDID() is used when not in context, a null string is returned.

Examples

  ON ERROR
    begin;
        IF ONCONDCOND() = ‘USERCONDITION’ THEN
           GOTO RECOVERY;
        Else
            CALL PLIDUMP(‘FBCHAT’);
    end;

Restrictions

None.