The following sections describe the effect of an EGL set statement:
The next table describes the set statements that affect a record as a whole, a fixed record as a whole, or an array of either.
Format of set statement | Effect |
---|---|
set record empty | Empties each of the elementary fields. For a record,
each subordinate record is emptied, as is each subordinate of those subordinates,
and so on. For a fixed record (which may itself be in a record), the elementary
fields are at the lowest level of the fixed structure. The effect on each
elementary field depends on the primitive type of that field:
|
set record initial | Resets the field values to those specified by the value property
at development time, as is possible for a record or fixed record that is declared
in a pageHandler or form. A value set by assignment is never reinstated. If the value property has no value or if the record is not in a pageHandler or form, the effect of set record initial is the same as the effect of set record empty, with one exception: for a field that is of type ANY, the set statement removes any type specification other than ANY. |
set record position | Establishes position in the VSAM file associated with
a fixed record of type indexedRecord (described later), or establishes position
in DL/I database associated with a record of type DLISegment (also described
later). This set-statement format is not available for an array. |
You can combine statement formats by inserting a comma to separate the options. For a given record, the options take effect in the order in which they appear in the set statement. Also, you can specify multiple records by inserting a comma to separate one from the next.
The syntax diagram is as follows:
The next table describes the set statements that affect a form as a whole.
Format of set statement | Effect |
---|---|
set form alarm | For text forms only; sounds an alarm the next time that a converse statement presents the form. |
set form empty | Empties the value of each field in the form, clearing
any content. The effect on a given field depends on the primitive type:
|
set form initial | Resets each form field to its originally defined state, as expressed in the form declaration. Changes that were made by the program are canceled. for a field that is of type ANY, the set statement removes any type specification other than ANY. |
set form initialAttributes | Resets each form field to its originally defined state, as expressed in the form declaration. The content of the field is not affected, neither (in the case of a field of type ANY) is the type affected. |
You can combine statement formats by inserting a comma to separate options such as empty and alarm. Also, you can specify multiple forms by inserting a comma to separate one form from the next.
The syntax diagram is as follows:
The options are as described in the previous table.
The next table describes the format of the set statement that affects a field in any context.
Format of set statement | Effect |
---|---|
set field empty | Empties the field or (for a fixed field that has a substructure)
empties every subordinate, elementary field. The effect depends on the
primitive type of a field:
|
set field null | Nulls the field, if doing so is valid. For details on when the operation is valid, see itemsNullable. |
The syntax diagram is as follows:
You may select one or the other option, and each is described in the previous table.
The next table describes the set statements that affect a field or an array of fields in a text form. A given set statement can combine options only in a particular set of ways, as described later. Many of the actions described are dependent on the device where the text form is displayed. It is recommended that you test your output on each of the devices that you are supporting.
Format of set statement | Effect |
---|---|
set field blink | Causes the text to blink repeatedly. This option is available only in COBOL programs. |
set field bold | Cause the text to appear in boldface. |
set field cursor | Positions the cursor in the specified field. If the field identifies an array and has no occurs value, the cursor is positioned at the first array element by default. If your program runs multiple statements of the format set field cursor, the last is in effect when the converse statement runs. |
set field defaultColor | Sets the field-specific color property to defaultColor, which means that other conditions determine the displayed color. For details, see Field-presentation properties. |
set field dim | Causes the field to be appear in lower intensity than normal. Use this effect to deemphasize field contents. In COBOL environments, the clause has the same effect as set field normalIntensity, causing the field to be visible, without boldface. |
set field empty | Initializes the value of the field, clearing any content. The effect on a given field depends on the primitive type, as described in Data initialization. |
set field full | Sets an empty, blank, or null field to a series of identical
characters before the form is presented:
The on-form characters are returned to the program only if the modified data tag for the field is set, as described in Modified data tag and property. A user who changes the field must remove all the on-field characters to prevent their return to the program. Use of set field full has an effect only if the form group is generated with the build descriptor option setFormItemFull. A field of type MBCHAR is considered to be empty if it contains all single-byte spaces. In relation to such fields, set field full assigns a series of single-byte characters. |
set field initial | Resets the field to its originally defined state, independent of any changes made by the program |
set field initialAttributes | Resets the field to its originally defined state, without using the value property (which specifies the current content of the field) |
set field invisible | Makes the field text invisible |
set field masked | Appropriate for password fields. If the text form is presented by a Java™ program, an asterisk is displayed instead of any non-blank character that the user types into an input field. If the text form is presented by a COBOL program, this option makes the field text invisible. |
set field modified | Sets the modified data tag, as described in Modified data tag and property. |
set field noHighlight | Eliminates the special effects of blink, reverse, and underline. |
set field normal | Resets the fields as described in relation to the following
formats:
For details, see the next table. |
set field normalIntensity | Sets the field to be visible, without boldface. |
set field protect | Sets the field so that the user cannot overwrite the value in it. See also set field skip. |
set field reverse | Reverses the text and background colors, so that (for example) if the display has a dark background with light letters, the background becomes light and the text becomes dark. |
set field selectedColor | Sets the field-specific color property
to the value you specify. The valid values for selectedColor are
as follows:
|
set field skip | Sets the field so that the user cannot overwrite the
value in it. In addition, the cursor skips the field in either of these cases:
|
set field underline | Places an underline at the bottom of the field. |
set field unprotect | Sets the field so that the user can overwrite the value in it. |
The syntax diagram is as follows:
The options are as described in the previous table.