beautypg.com

Alertcreate – Visara Master Console Center Scripting Guide User Manual

Page 71

background image

Chapter 5 Script Commands

Scripting Guide

71

ALERTCREATE

Syntax:

ALERTCREATE( %Status, %State, $Source, $MsgText, $UserNote)
==> %AlertID

Description:

Create a new Alert.

Action:

A new Alert is created in the Alert Window, using the specified

arguments.

Parameters:

%Status. Numeric expression. The status number to set the alert to,

which effectively sets its color. The range of status numbers is 1 to

16. For a list of the status constants, numbers, and colors, refer to the
description of the ICON() command on page 130.
%State. Numeric expression. The current state of the alert. An alert
is New, Open, or Closed. Use the following constants for clarity:

Manifest Constant
ALERTSTATE_NEW
ALERTSTATE_OPEN

ALERTSTATE_CLOSED

ALERT_RECEIVEDFAILED

Value
0
1

2

-21

$Source. String expression. Name of the source of the alert. In

general, use the OS name of the system or device. Limited to 11
characters.
$MsgText. String expression. The alert text displayed in the

Message field of the Alert.

$UserNote. String expression. The text displayed in the User notes

field of the Alert.

Returns:

The unique ID number of the Alert. The alert ID is used to update
the alert.

Notes:

Do not use $MsgText or $UserNotes strings longer than 450
characters. This can have unpredictable results.

Examples:

%AlertID := ALERTCREATE(STATUS_ERROR, ALERTSTATE_NEW,
$OSName, “JES2 ABEND”, “Script is performing auto-
recovery”)
%AlertID := ALERTCREATE(STATUS_WARNING, ALERTSTATE_NEW,
$OSName, “Login Failure”, “”)

See Also: