You can specify field level properties for fields in both text forms and print forms. The following table shows the types of form fields for which you can specify each property. In many cases you specify these properties on data items that you use as types for form fields.
These categories are loose and non-exclusive. The align property, for example, affects both input formatting and display, although the effect on input is considered primary.
Note also that the properties do not have any effect during runtime processing. If you move the data from a STRING variable to a CHAR(20) variable with align = right, the data does not itself become right-aligned; it merely prints or displays as right-aligned. (For an easy way to right-align data, see Right-justifying a character variable.)
Following the table, individual sections explain the properties that apply to fields in the various types of forms, starting with the most general (those you can use on any form) and working down to the most specific (those that apply to, for example, text form variable fields only).
| Property | Usage | Valid for text form | Valid for print form | ||
|---|---|---|---|---|---|
| Constant | Variable | Constant | Variable | ||
| align | F | Yes | Yes | ||
| color | P | Yes | Yes | ||
| currency | F | Yes | Yes | ||
| currencySymbol | F | Yes | Yes | ||
| dateFormat | F | Yes | Yes | ||
| detectable | P | Yes | Yes | ||
| fieldLen | F/P | Yes | Yes | Yes | Yes |
| fill | V | Yes | |||
| fillCharacter | F | Yes | Yes | ||
| highlight | P | Yes | Yes | Underscore only | Underscore only |
| inputRequired | V | Yes | |||
| inputRequiredMsgKey | V | Yes | |||
| intensity | P | Yes | Yes | ||
| isBoolean | F | Yes | |||
| isDecimalDigit | V | Yes | |||
| isHexDigit | V | Yes | |||
| lowerCase | F | Java™ only | |||
| masked | F | Yes | |||
| minimumInput | V | Yes | |||
| minimumInputMsgKey | V | Yes | |||
| modified | P | Yes | |||
| needsSOSI | V | Yes | |||
| numericSeparator | F | Yes | Yes | ||
| outline | P | Yes | Yes | Yes | Yes |
| protect | P | Yes | Yes | ||
| sign | F | Yes | Yes | ||
| timeFormat | F | Yes | Yes | ||
| timestampFormat | F | Yes | Yes | ||
| typeChkMsgKey | V | Yes | |||
| upperCase | F | Yes | |||
| validationOrder | V | Yes | |||
| validatorDataTable | V | Yes | |||
| validatorDataTableMsgKey | V | Yes | |||
| validatorFunction | V | Yes | |||
| validatorFunctionMsgKey | V | Yes | |||
| validValues | V | Yes | |||
| validValuesMsgKey | V | Yes | |||
| zeroFormat | F | Yes | Yes | ||
The following properties are useful for any field—constant or variable—on a text or print form:
| Property | Description |
|---|---|
| fieldLen | Specifies the number of single-byte characters that can be displayed. Optional. |
| position | Specifies the a row and column number for the beginning of a form field. Required. |
| value | Identifies a string literal that is displayed as the field content. Optional. |
For a variable field on a text or a print form, you can specify most of the formatting properties (marked with an "F") in the "Field level property usage" table above. See the table for specifics; for example, lowerCase operates on input only, so has no effect on print forms.
myArray char(1)[3];
EGL positions the elements of the array based on the position you specify for the first element in the array. By default, EGL positions the elements vertically on consecutive rows.
Use the following properties to vary the default behavior:
| Property | Description |
|---|---|
| columns | Specifies the number of columns in which to display the elements of a variable field array. |
| indexOrientation | Specifies how the program displays the elements of an array. |
| linesBetweenRows | Specifies the a row and column number for the beginning of a form field. |
| spacesBetweenColumns | Specifies the number of spaces separating each column of elements from an array field. |
myArray char(10)[5]
{position=[4,61], protect=skip, myArray[2] {cursor = yes} };
The following properties are useful on text form fields:
| Property | Description |
|---|---|
| cursor | Indicates whether the cursor is at the beginning of the field when the form is first displayed. |
| detectable | Enables field detection with a light pen (COBOL) or mouse (Java). |
| protect | Prevents users from changing the value of the field. |
In addition, any field on a text form (variable or constant) can take any of the presentation properties (marked with a "P") in the "Field level property usage" table above.
The following properties are useful for variable text fields:
| Property | Description |
|---|---|
| modified | Marks the field as changed. |
| validationOrder | Indicates the position of the field in the validation order. |
In addition, a variable field on a text form can take any of the validation properties (marked with a "V") in the "Field level property usage" table above.
There are no properties specific to print form variables.