Usage for display files (position 38)

You 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:

Entry
Meaning
Blank or O
Output only

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 and the data is taken from the output buffer.

I
Input only

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.

B
Input/output (both)

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.

H
Hidden (special input/output field)

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.

The following rules apply to hidden fields:
  • Hidden fields are always named.
  • Locations are not valid for hidden fields.
  • Specify length, data type, and decimal positions as you do for other named fields.
  • You can specify more than one hidden field for a display file.

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.

M
Message (special output field)

A message field is a named, output-only, character field.

The following rules apply to message fields:
  • You can use option indicators to select message fields, but during processing, only one message can be displayed at a time. The message from the first message field selected is displayed, and all others are ignored for that operation.
  • When a message field displays, all other fields you specify for that record are processed in the normal manner. The device goes into an error condition (locked keyboard, blinking cursor, and message displayed with the high intensity (HI) display attribute). When you press the Reset key, normal processing continues.
  • The text of the message is established when your program moves a value to the message field.
  • The location of the message on the display is the message line (the last line on the display unless the MSGLOC keyword is in effect).
  • The length you specify for the message field should be less than 79 positions for 24 x 80 workstations, or less than 131 positions for the 27 x 132 workstation. Any message text that occupies more than 78 positions on the 24 x 80 workstations, or more than 130 positions on a 27 x 132 workstation is truncated to fit the message line.
  • The Help key is not supported for message fields. Message help for the message is not displayed when Help is pressed.
  • Only the following keywords are valid for a message field:
  • You cannot specify M in position 38 for a field if the field is part of the subfile record format.
Note: It is valid to send an input operation to a record that contains no input-capable fields. This permits pressing a function key as a response to an output record.
P
Program-to-system (special output field)

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. The field 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. Because program-to-system fields are not displayed, they are not considered output-capable fields, even though the program can send data to them.

The following rules apply to program-to-system fields in display files:
  • Program-to-system fields are always named.
  • Locations are not valid for program-to-system fields.
  • Specify length, data-type, and decimal positions as you do for other named fields.
  • The program-to-system field must be specified as a parameter on a CHCACCEL, CHCCTL, CHKMSGID, CHOICE, ERRMSGID, GRDATR, GRDBOX, GRDCLR, GRDLIN, HTML, MNUBARCHC, MSGID, PSHBTNCHC, SFLCHCCTL, SFLMSGID, SFLSIZ, WDWTITLE, or WINDOW keyword within the same record format. The P-usage field is not valid as a parameter on any other keyword. A severe error is sent if the field is not specified on at least one of these keywords.
  • Unlike the P-usage fields in ICF files, P-usage fields in display files can appear anywhere in the buffer. In ICF files, P-fields must be specified after all the data fields (B-usage fields).
  • A P-usage field can be specified as the message-identifier, message-file, or library name on a MSGID keyword, provided the field is defined with the proper attributes, such as length.
  • The record containing the P-usage field must be written before the data contained within the P-usage field is known to the system.

The only keywords allowed on a program-to-system field are:

Notes:
  1. Input-only and input/output fields are input-capable fields.
  2. Output-only and input/output fields are output-capable fields.
  3. Output-only is the default if you leave the position blank.