Previous Topic: $RECALL SERVICE=ACTION

Next Topic: How You Specify Field Values When Calling $REDBAPI from an NCL Procedure

$REDBAPI SERVICE=CREATE

This API procedure function call creates an EventView rule set or message rule definition in the knowledge base.

Syntax

This API procedure function call has the following format:

$REDBAPI SERVICE=CREATE
        [TRUNCATE={YES|NO}]
         CLASS=cc
         RULESET=ruleset-name
        [field-name-1=field value-1]
        [field-name-2=field value-2]
        …
        [field-name-n=field value-n]

Operands

Important! If possible, do not use the semi-colon (;) in values. By default, a semi-colon is interpreted as a command separator if the API is executed (EXEC) or started (START). If you must use the semi-colon and you are calling the API from an NCL procedure, use the &CALL verb.

This API procedure function call has the following operands:

SERVICE=CREATE

Specifies that you want to create a definition in the knowledge base.

TRUNCATE={YES|NO}

Specifies whether a field value is truncated if it is longer than the field length.

YES

Specifies that long values are truncated and the definition is created in the knowledge base.

NO

Specifies that no truncation is allowed. If a long value is encountered, the definition is not created in the knowledge base.

CLASS=cc

Specifies the two-digit identifier of the EventView class to which the definition belongs.

93

Specifies the rule set class.

94

Specifies the message rule class.

RULESET=ruleset-name

Specifies the name of the rule set to be created or the name of the rule set in which to create a message rule.

field-name-n=field-value-n

Specifies the values of the fields in the definition.

Limits: A value must not contain the question mark (?) character.

Return Variables

This API procedure function call returns the following variable:

&SYSMSG

Contains the returned message.

&ZRENAME

Contains the name of a created message rule.

Return Codes

Return codes indicate the success or failure of processing. This API procedure function call returns the following return codes in the &RETCODE variable:

0

Indicates that processing was successful.

4

Indicates that processing was successful, but truncation has occurred.

8

Indicates that processing failed.

16

Indicates that error occurred in the call syntax.

Example: Define a Rule Set

This example creates the SUPP rule set definition (class 93), with truncation allowed:

&SDESC=&STR Suppression rules
&CALL PROC=$REDBAPI +
      PARMS=(SERVICE=CREATE,+
             CLASS=93,+
             RULESET=SUPP,+
             SDESC=&SDESC)

More information:

Rule Set Fields

Message Rule Fields