Previous Topic: Define Alert Monitor Actions

Next Topic: Using Linked Product Regions

Definition Syntax

The $AMCBCMX exit is in NCL and uses the following subroutines. You define your actions under those subroutines.

SetActions

Describes the actions you want to define. The following variables describe each action. n is a number that identifies a set of variables for an action.

&$AM$NAMEn

Specifies a unique name for the action.

&$AM$DESCn

Specifies a brief description for the action.

&$AM$CODEn

Specifies the action code, which appears on the list of available actions for the Alert Monitor. Do not duplicate an existing action code.

Limits: One through three characters

InvokeAction

Specifies the action to take. Each action has the following construction:

&IF .&#AM#NAME = .action_name &THEN +
   &DO                                   
      &#AM$RC = 0                        
      ncl_code                 
   &DOEND
action_name

Specifies the name to which the action is associated. This name is as defined in a &$AM$NAMEn variable in the SetActions subroutine.

ncl_code

Specifies the code executed for the action. Typically, this code calls an NCL procedure.

Example: Define an Action That Calls an NCL Procedure

This example defines the A01 action code that calls the NCL001 procedure.

.SETACTIONS
   &$AM$NAME1 = RUN_NCL001
   &$AM$DESC1 = &STR Run the NCL001 procedure
   &$AM$CODE1 = A01
   &RETSUB 0
.INVOKEACTION
   &#AM$RC = 8
   &IF .&#AM#NAME = .RUN_NCL001 &THEN +
      &DO
         &#AM$RC = 0
         &CALL PROC = NCL001
         &#AM$MSG = &SYSMSG
      &DOEND
   &RETSUB 0