SFLDROP (Subfile Drop) keyword for display files
You use this record-level keyword on the subfile-control record format to assign a command attention (CA) key or a command function (CF) key that the workstation user can press to fold or truncate subfile records that require more than one display line.
SFLDROP(CAnn | CFnn)
Without SFLDROP, the IBM® i operating system displays the entire subfile record and folds it where needed. When SFLDROP is specified, the IBM i operating system first displays the subfile in truncated form; subfile records are truncated to fit on one display line. When the workstation user presses the specified key, the IBM i operating system displays the records again in folded form. Each record continues onto subsequent lines immediately following the line the record starts on.
By pressing the specified key, the form of the displayed subfile changes from one state to the other.
In the truncated form, more records are displayed than are specified on the SFLPAG keyword. In the folded form, as many records are displayed as are specified on the SFLPAG keyword.
The IBM i operating system truncates subfile records in the middle of output-only fields. However, if the truncation is in the middle of an input-capable field, the whole field is omitted from the display. If this results in omitting the entire record from the display, an error message is sent to the display and the record is not truncated. Instead, it is displayed in folded form.
- A warning message is sent at file creation if the entire record fits on a single display line.
- If subfile size equals subfile page, SFLDROP is ignored. When several display sizes are used (DSPSIZ keyword specified), SFLDROP is ignored only for display sizes for which the subfile size equals subfile page. If the subfile record format contains field selection, SFLDROP is not valid.
- If the subfile contains input-capable fields, it is recommended that you specify a CF key rather than a CA key. If you specify a CA key in this situation, changed data is lost when the key is pressed.
- If several subfiles using SFLDROP are displayed at one time, the same function key should be specified on each SFLDROP keyword. If the function keys are different, only the key specified for the most recently displayed subfile is in effect. Pressing the function key affects the subfile containing the cursor. If the cursor is not positioned in a subfile, the function key affects the upper subfile.
- SFLDROP can be specified on the same subfile-control record format as the SFLFOLD keyword. If both keywords are active, the SFLFOLD keyword is used. Indicators are checked at the time the subfile is displayed. Both keywords must use the same key.
Option indicators are valid for this keyword.
Example
The following example shows how to specify the SFLDROP keyword.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A R SFLR SFL
A*
A* (subfile records should not fit on one screen line)
A*
00040A R SFLCTLR SFLCTL(SFLR)
00050A SFLPAG(17)
00060A SFLSIZ(34)
00070A SFLDSP SFLDSPCTL
00090A SFLDROP(CF03)
A
When the subfile is displayed, the workstation user can press the CF03 key to change the subfile from truncated to folded form and from folded to truncated form.