DEACT


DEACT  {onin_onout_labels}
       {event_names}
       {ALL IO ONS}
       {ALL EVENT ONS}

Where

onin_onout_labelsare one or more labels coded on previous ONIN or ONOUT statements. Multiple labels must be separated by commas.

event_namesare one or more string expressions that specify the names of events. Multiple event names must be separated by commas. String constant expressions must be 1 to 8 alphanumeric characters and enclosed in single or double quotes. (Strings containing hexadecimal constants are exempt from this restriction.) If you specify a nonconstant string expression, the first 8 characters of the string or substring are used. If the string is shorter than 8 characters, the available characters are used. To satisfy conditions using event names, the first 8 characters must match exactly. If you specify a string variable, it cannot be the name of one of the reserved variables (for example, BUFFER).

Function

The DEACT statement deactivates outstanding ONIN, ONOUT, or ON SIGNALED statement conditions. Unless explicitly deactivated using this statement, these conditions will remain active for the duration of the current STL program (ONIN and ONOUT), or until the specified event is signaled (ON SIGNALED).

If you specify ONIN or ONOUT labels, only the conditions on the statement identified by those labels are deactivated. If ALL IO ONS is specified, all currently active ONIN and ONOUT conditions are deactivated.

If you specify event names, all ON SIGNALED conditions referencing the specified names are deactivated. If you specify ALL EVENT ONS, all currently active ON SIGNALED conditions are deactivated.

Examples

    Example 1

getout: onin index(data,'ABEND') > 0 then deact getout
                           /* Don't look for ABEND anymore.      */

    Example 2

on signaled('ALLOK') then say 'Everything went well with this test'
⋮
if index(screen,'ERROR!!!') > 0 then
   deact 'ALLOK'           /* Deactivate all ON conditions for   */
                           /* event ALLOK if an error occurs.    */
⋮
signal 'ALLOK'             /* Write ALL OK message if there were */
                           /* no errors.                         */

    Example 3

red:   onin index(data,'RED') > 0 then color = 'RED'
blue:  onin index(data,'BLUE') > 0 then color = 'BLUE'
green: onin index(data,'GREEN') > 0 then color = 'GREEN'
⋮
if index(screen,'GRAPHIC CARD ERROR') > 0 then
   deact red, blue, green

    Example 4

on signaled('INITCARD') then say 'Graphic Card Initialized'
on siganled('INITSCRN') then say 'Screen Initialized'
on signaled('INITMENU') then say 'Please Make a Selection'
⋮
if index(screen,'ERROR') > 0 then
   deact 'INITCARD', 'INITSCRN', 'INITMENU'

Notes

  • If you use an ONIN or ONOUT label in the DEACT statement, you must have coded the label on an ONIN or ONOUT statement above the DEACT statement in the current STL program. Attempts to deactivate specific ONIN or ONOUT conditions that have not yet been processed by the STL Translator in the current program are flagged as errors.
  • When multiple labels or names are entered on several lines, two commas are necessary to continue the DEACT statement. For example:
    DEACT 'EVENT1', 'EVENT2',,
          'EVENT3'