TRIGGER command

The TRIGGER command raises the specified AT-condition in z/OS® Debugger, or it raises the specified programming language condition in your program.

Read syntax diagramSkip visual syntax diagramTRIGGERATCURSORconditionATALLOCATEidentifier*ATAPPEARANCEcu_spec*ATCALLentry_name*ATCHANGEreferencestorage_clauseATDATEblock_spec*ATDELETEload_spec*ATENTRYblock_spec*ATEXITblock_spec*ATGLOBALAPPEARANCECALLDATEDELETEENTRYEXITLABELLINELOADPATHSTATEMENTATLABELstatement_label*ATLINEstmt_id_spec*ATLOADload_spec*ATOCCURRENCEconditionATPATHATSTATEMENTstmt_id_spec*;
storage_clause
Read syntax diagramSkip visual syntax diagram%STORAGE(address,length)
condition
A valid condition or exception. Depending on the current programming language setting, this code can be any one of the following types of codes:
  • A Language Environment® symbolic feedback code
  • A language-oriented keyword or code
  • When an application runs without the Language Environment run time, one of the ABEND codes shown below.

If no active condition handler exists for the specified condition, the default condition handler can cause the program to end prematurely.

Following are the C condition constants; they must be uppercase and not abbreviated.

There are no COBOL condition constants. Instead, an Language Environment symbolic feedback code must be used, for example, CEE347.

PL/I condition constants can be used; for syntax and acceptable abbreviations see the ON command.

When you are running without the Language Environment run time, use one of the following codes:

  • Codes Sxxx and Uxxx to represent MVS System and User ABENDs. In this case the xxx is three hexadecimal digits representing the ABEND code.
  • Any four-character string to represent a CICS® ABEND code.
cu_spec
A valid compile unit specification.
entry_name
A valid external entry point name constant or zero (0); however, 0 can only be specified if the current programming language setting is C or PL/I.
reference
A valid z/OS Debugger reference in the current programming language.
%STORAGE
A built-in function that provides an alternative way to select an AT CHANGE subject.
address
The starting address of storage to be watched for changes.
length
The number of bytes of storage being watched for changes. This must be a positive integer constant. The default value is 1.
load_spec
A valid load module specification.
block_spec
A valid block specification.
statement_label
A valid source label constant.
stmt_id_spec
A valid statement id specification.

Usage notes

  • If the EQAOPTS THREADTERMCOND command prevents z/OS Debugger from stopping when a FINISH, CEE066, or CEE067 thread termination condition is raised by Language Environment, z/OS Debugger does not gain control when these conditions are raised. If you want z/OS Debugger to gain control when these conditions are raised, you can set an AT OCCURRENCE breakpoint or change the EQAOPTS THREADTERMCOND command to allow z/OS Debugger to gain control.
  • AT TERMINATION cannot be raised by the TRIGGER command.
  • An enclave cannot be stopped by the TRIGGER command.
  • If you are replaying recorded statements by using the PLAYBACK commands, you cannot use the TRIGGER command.

Examples

In the first example, note the following differences

  • Triggering a breakpoint (TRIGGER AT OCCURRENCE CEE347), which performs z/OS Debugger commands associated with the breakpoint. The condition is not raised.
  • Triggering a condition (TRIGGER CEE347), which raises the condition and causes a corresponding system action. A corresponding system action can be a condition handler.
  • Perform the commands in the AT OCCURRENCE CEE347 breakpoint (the CEE347 condition is not raised). The current programming language setting is COBOL.
    AT OCCURRENCE CEE347 PERFORM
      SET ix TO 5;
    END-PERFORM;
    
    TRIGGER AT OCCURRENCE CEE347;   ⁄* SET ix TO 5 is executed *⁄
  • Raise the SIGTERM condition in your program. The current programming language setting is C.
    TRIGGER SIGTERM;
  • A previously defined STATEMENT breakpoint (for line 13) is triggered.
    AT 13 LIST "at 13";
    TRIGGER AT 13;
    ⁄* "at 13" will be the echoed output here *⁄
  • Assume the following breakpoints exist in a program:
    AT CHANGE x LIST TITLED (x); AT STATEMENT 10;
    If z/OS Debugger is started for the STATEMENT breakpoint and you want to trigger the commands associated with the AT CHANGE breakpoint, enter:
    TRIGGER AT CHANGE x;
    z/OS Debugger displays the value of x.

Refer to the following topics for more information related to the material discussed in this topic.