Use this position to specify that a named field is an output-only, input-only, input/output (both), hidden, program-to-system, or message field.
Make no entry in this position for a constant (unnamed) field.
The valid entries for display files are:
Output-only fields pass data from a program to the device when the program writes a record to a display. You can use the DFT (Default) keyword to specify an initial value for a named output field if you also specify the OVRDTA keyword for the field. If the OVRDTA keyword is not in effect, the initial value for the field is used. If the OVRDTA keyword is in effect, the data for the field is used. If the OVRDTA keyword is in effect, the data for the field is taken from the output buffer.
Input-only fields pass data from the device to a program when the program reads a record. Input fields can be initialized with a default value (specified on the DFT keyword). If you do not change the field and the field is selected for input, the default value is passed to the program. Input fields are, by default, underlined on the display. You can use the Change Input Default (CHGINPDFT) keyword or the Display Attribute Underline (DSPATR(UL)) keyword to prevent underlining.
Input/output fields are passed from a program when the program writes a record to the display and are passed to a program when the program reads a record from the display and the field is selected for input. Input/output fields are typically used when the program displays data that you can change. An initial value can be specified for the field on the DFT keyword. When DFT is specified, the OVRDTA keyword is also required and indicates whether the data displayed in the field is taken from the output buffer (OVRDTA in effect) or from the DFT keyword (OVRDTA not in effect). Input/output fields are, by default, underlined on the display.
A hidden field is a named, numeric, alphanumeric, date. time, or timestamp field that does not appear on the display. Your program can send data to the field with an output operation, and it can retrieve data from the field with an input operation, but you cannot see or change the contents of the field.
Since hidden fields are not displayed, they are not considered input-capable or output-capable fields, even though your program can send and receive data from them.
The DATFMT and DATSEP keywords can be used on a date hidden field, and the TIMFMT and TIMSEP keywords can be used on a time hidden field. However, no formatting is done by the system when the record containing the hidden date or time field is written or read.
Hidden fields are useful in applications involving subfiles. For example, a subfile record can contain record key information in a hidden field. You cannot see the hidden field, but the field is returned to the program with the subfile record so that the program can return the record to the database.
A message field is a named, output-only, character field.
ALIAS |
REFFLD |
A program-to-system field is a named, numeric, or alphanumeric output-only field that is used to pass data between the program and the system; it does not appear on the display. Your program can send data to the field with an output operation, but the workstation user cannot see the contents of the field. Since program-to-system fields are not displayed, they are not considered output-capable fields, even though the program can send data to them.
The only keywords allowed on a program-to-system field are:
ALIAS |
TEXT |