add

The EGL add statement provides the fundamental "create" capability for the language.

The EGL add statement adds a new record or a set of new records to a data source. This data source can be a file, database, or message queue. The exact behavior of the statement depends on the way you have stereotyped your record variable (see Stereotypes).

For specific considerations that apply to the add statement when you use various data source technologies (such as SQL), see the related reference at the end of this topic.

Syntax

Syntax diagram for the add statement
recordVariable
Name of the record variable from which EGL copies data.

Example

The following example adds information entered by the user to the current data source:

if (userRequest == "A")
    try 
      add record1;
    onException(exception AnyException)
      myErrorHandler(exception);
    end
end

Feedback