Previous Topic: ENVAR Statement—Pass Environment VariablesNext Topic: EVENTCATEGORY Statement—Specify a Windows Event Category


EVENT Statement—Specify the SAP Event to Monitor or Trigger

The EVENT statement specifies the SAP event to monitor or trigger.

Supported Job Type

This statement is required for the SAP Event Monitor job type.

Syntax

This statement has the following format:

EVENT 'event_name' TRIGGER|REGISTER [PARM(event_parameter)]
     [CONTINUOUS(alertid)]
event_name

Specifies the name of the SAP event to monitor or trigger.

Limits: Up to 32 valid SAP characters; case-sensitive

TRIGGER|REGISTER

Specifies the action to take.

TRIGGER

Triggers the SAP event.

REGISTER

Monitors for the SAP event.

PARM(event_parameter)

(Optional) Specifies the name of the SAP event parameter.

Limits: Up to 65 valid SAP characters

CONTINUOUS (alertid)

(Optional) Specifies the identifier of an alert to be triggered when the SAP event is triggered (raised). Defines the job as continuous. To end continuous monitoring, you must complete the job manually or cancel it. If you do not specify this operand, the job completes when the SAP event is triggered (raised).

alertid

Specifies the alert identifier to be triggered.

Limits: 1-8 alphanumeric characters; the first character must be alphabetic

Note: The alert must have been previously defined to the scheduling manager. Not all scheduling managers support the CONTINUOUS operand.

Note: The CONTINUOUS operand is only applicable to the REGISTER action. The REGISTER action performs the monitoring of SAP events.

Note: Enclose values that contain delimiters (such as spaces) in double quotation marks.

Example: Monitor an SAP event

This example monitors the SAP event named SAP_Event. When the SAP event is raised, the job completes.

SAPJOBNAME CYBERSAP1
AGENT SAPHTAGENT
EVENT 'SAP_Event' REGISTER PARM(2)

Example: Trigger an SAP event

This example triggers the SAP event named SAP_Event. The event parameter is 2.

SAPJOBNAME CYBERSAP3
AGENT SAPHTAGENT
EVENT 'SAP_Event' TRIGGER PARM(2)

Example: Trigger Alert When the SAP Event is Raised

This example monitors the SAP event named SAP_Event. When the SAP event is raised, the alrt alert is triggered on the scheduling manager.

SAPJOBNAME CYBERSAP2
AGENT SAPHTAGENT
EVENT 'SAP_Event' REGISTER CONTINUOUS(alrt)