Adding a User Defined Option

Use F6=Add on the Work with User Defined Options display to open the Add User Defined Option display.

Parameters on the Add User Defined Option display

The following options are available on the Add User Defined Option display.

Option type

When adding a user defined option by taking F20=WRKUSROPT from the Work with Alert Log display, this parameter is hard-coded as ALT. When adding a user defined option by taking F20=Work with User Defined Options from the Message Console - Alerts view display, this parameter is hard-coded as CON.

Option code

Allows you to define the two character option code. Option codes must begin with a character in the range A-Z. The optional second character can be alphanumeric in the range A-Z or 0-9. If renaming an existing option code, simply overtype the existing characters.

To assign a command to this new option code use F6=Add to display the Add Option Command display.

Command or option

Type the command or built-in option to run. You can specify any command that is allowed to run in the *EXEC environment (in most cases these are the same as the commands that can be run at a command line). The entered command may include substitution variables. Use F4=Prompt to view the major command groups. Use F16=List substitution variables to display a range of valid substitution variables that can be used in the command.

Once the command or option has been entered, press Enter to add it to this option code. You can define multiple commands within a single option code which are then run in sequence.

EXAMPLE:

Assuming an Option code of AC, you can add the following commands to acknowledge the alert and send an email.

Seq Command or option

10 ACKALT ALERT (&ALERTID)

20 SNDTXTMSG MSG (‘Acknowledged: &ALERTID / &ALERT’) TOMSGDEV (*EMAIL) EMAILADDR (TECHNICALSERVICES@HS.COM)

Changing the order in which commands are run

To change the order in which the commands are run for a specific option code, simply overtype the current sequence number with the new sequence number, All sequence numbers must be unique and the run order always starts with the lowest sequence number first.