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 or an array of records.
Format of set statement | Effect |
---|---|
set record empty | Initializes the each of the elementary structure items, which are those
at the lowest level of the record structure. The effect on each item
depends on the primitive type, as described in Data
initialization.
This format is available for an array of records. |
set record position | Establishes position in the VSAM file associated with an indexed record,
as described later.
This format is not available for an array of records. |
For an indexed record, you can combine statement formats, inserting a comma to separate the options empty and position. The options take effect in the order in which they appear in the set statement.
The syntax diagram is as follows:
If the set value is filled with hexadecimal FF values, the following is true:
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 | Initializes the value of each field in the form, clearing any content. The effect on a given field depends on the primitive type, as described in Data initialization. |
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. |
set form initialAttributes | Resets each form field to its originally defined state, as expressed in the form declaration, but with one exception: The statement does not use the value property, which specifies the current content of a given field, to reset the contents of the fields. |
You can combine statement formats, inserting a comma to separate options such as empty and alarm. Of the following formats, you can choose one or none:
Of the following formats, you can choose one, both, or none:
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 an item in an SQL record.
Format of set statement | Effect |
---|---|
set item null | Nulls the item, as is valid only for structure items that are in records of type SQLRecord, and only if the IsNullable property of the item is set to yes. (Arrays are not valid in records of type SQLRecord.) For details on null processing, see SQL item properties. |
The syntax diagram is as follows:
The options are as 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.
Format of set statement | Effect |
---|---|
set field blink | Causes the text to blink repeatedly. |
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 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 | Removes any indication that the field is on the form. |
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. |
You can combine statement formats, inserting a comma to separate options such as cursor and full, in any of three ways:
The syntax diagram is as follows:
The options are as described in the previous table.
Related concepts
Form part
Modified data tag and modified property
Syntax diagram
Related reference
Data initialization
EGL statements
Field-presentation properties
get next
get previous
Items
setFormItemFull
SQL item properties
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.