Form fields

The following diagram shows a form field:

Syntax diagram for a form field
*
Indicates that the field is a constant field. It has no name but has a constant value, which is specified in the field-specific value property. Statements in your code cannot access the value in a constant field.
fieldProperty
A form field property that can apply to a constant or a variable field. For more information, see Form field properties.
fieldName
Specifies the name of the field. Your code can access the value of a named field.

If a text form contains a field that starts on one line and ends on another, the text form can be displayed only on screens where the screen width equals the width of the form.

index
The number of elements in an array. Only one-dimensional arrays are supported.
primitiveType
The primitive type assigned to the field. This specification affects the maximum length; but any numeric field is generated as type NUM.

Forms that contain fields of type DBCHAR can only be used on systems and devices that support double-byte character sets. Similarly, forms that contain fields of type MBCHAR can only be used on systems and devices that support multiple-byte character sets.

The primitive types FLOAT, SMALLFLOAT, and UNICODE are not supported for text or print forms.

length
The length of the field, where required. This is an integer that represents the maximum number of characters or digits that can be placed in the field.
decimals
For some numeric types (BIN, DECIMAL, NUM, NUMC, or PACF), you can specify a number of decimal places. The maximum number of decimal positions is the smaller of two numbers: 18 or the number of digits declared as length. The decimal point is not stored with the data.
dataItemPartName
The name of a DataItem part that is a model of format for the field, as described in Specializing primitive types as DataItem parts. The DataItem part must be visible to the form part.

Compatibility

Table 1. Compatibility considerations for form fields
Platform Issue
IMS/VS
  • Row 1, column 1 of the form must be blank, or contain a constant or variable field attribute byte.
  • If the text form is displayed using the IMS™ /FORMAT command, all variable fields in the form are set to blanks instead of to the initial values defined in the form definition.
  • Because the screen is automatically cleared after each converse statement, multiple partial forms are not supported for text forms.
  • Unprotected constant fields are not supported. The generated MFS defines them as though they were protected. If a constant field attribute byte is in the last position of a form (last row, last column), it is treated as though it is in row 1 column 1. A zero-length constant field is not supported for forms. Non-blank constant fields longer than 255 bytes are not supported. DBCHAR constant fields longer than 254 bytes are not supported. MBCHAR constant fields longer than 255 bytes are not supported.
COBOL generation The following data types are not supported for form fields:
  • BOOLEAN
  • HEX
  • FLOAT
  • SMALLFLOAT
  • STRING
  • TIME
  • TIMESTAMP
  • INTERVAL

Feedback