Type/Length: CHAR, 10
Modifiable: YesThe Screen Management Facility (SMF) uses this system field to return values that indicate the status of operations. Values can be assigned to this system field to control the form operation.
Table 4 summarizes the values that are returned by @FILL_ACTION and Table 5 shows the values that can be assigned to @FILL_ACTION. Table 6 shows specific functions that associated with @FILL_ACTION assignments in data field triggers. Table 7 is similar, showing functions for @FILL_ACTION assignments in final triggers.
After FILL Execution: When the FILL statement/command terminates execution or the final trigger is executed, @FILL_ACTION has one of the following values:
"OK" indicates the FILL statement/command was terminated by typing the character in @END_CODE.
- "CANCEL" indicates the FILL statement/command was terminated by typing the character in @CANCEL_CODE.
After Perform Always After: @FILL_ACTION returns "DATA" or "NODATA" when a PERFORM ALWAYS AFTER trigger is executed. The @FILL_ACTION value can be checked for within the performed trigger.
"DATA" if any of the following occurred:
- A value was input for a ENTER field.
- A value was modified for a CHANGE field.
- The cursor passed through a SHOW field (which always contains data). Note that the cursor does not stop at a SHOW field, but only passes through it.
- A CHOICE field was selected with one of the keys defined in @TERM_LIST.
- "NODATA" if none of the above occurred.
In a trigger that is associated with a data field, a value may be assigned to @FILL_ACTION to direct the form operation.
"INVALID" indicates the input data value is invalid and re-prompts the user for the data when the trigger is finished. After the trigger completes execution, the terminal bell will ring and the value of the current field is redisplayed. If the field's value is changed in the trigger, the new value will be displayed. All other data entry areas will retain their previous values. If a data entry error is detected in the trigger, @FILL_ACTION can be set to "INVALID" and an error message displayed that asks the user to reenter the data.
"END" terminates the form operation. This is equivalent to typing the terminating code specified in @END_CODE. If a final trigger is defined, it will be executed.
"REDISPLAY" causes SMF to update all values in the form upon return from the trigger. "REDISPLAY" enables new values to be displayed for form fields that were changed in the trigger. Any changes to field values that were made within the performed trigger will then be reflected on the screen.
"REDO" causes SMF to position the cursor at this field again and wait for operator input upon return from the trigger. All data entry areas retain their previous values. This is useful when there are additional steps needed after the user has entered data for a field correctly.
Any PERFORM BEFORE trigger associated with the field will be executed.
While in the final trigger, one of the following values may be assigned to @FILL_ACTION to direct the form operation:
"INVALID" indicates that when the trigger is finished, control goes back to the form and the cursor points at the first modifiable field.
- "RESTART" indicates when the trigger is finished, restart the form operation. All data entry area will be cleared.
NOTE: The user can be prevented from terminating a form with the keys in @END_CODE and @CANCEL_CODE. In any trigger called by a PERFORM AFTER for a field, assign "REDO" or "INVALID" to @FILL_ACTION.
SEE ALSO: FILL statement/command (earlier in this section).
Returns |
Perform W/O Options |
Perform Before |
Perform After |
Final Trigger |
OK |
NO |
YES |
NO |
YES |
CANCEL |
NO |
NO |
NO |
YES |
DATA |
YES |
NO |
YES |
NO |
NODATA |
NO |
NO |
YES |
NO |
Table 4 @FILL_ACTION Returns
Assignments |
Perform W/O Options |
Perform Before |
Perform After |
Final Trigger |
INVALID¹ |
YES |
NO |
YES |
YES |
END |
YES |
NO |
YES |
NO |
REDO |
YES |
NO |
YES |
NO |
RESTART |
NO |
NO |
NO |
YES |
Table 5 @FILL_ACTION Assignments
¹ INVALID can be assigned in a data field trigger or in a final trigger, but operates a little differently.
Assignments |
Exit Form Operation |
Restart Form Operation |
Ring Bell |
Clear Data Entry Areas |
Update Data Entry Areas |
Cursor Position |
INVALID |
NO |
NO |
YES |
NO |
Current field only |
Current field² |
END |
YES¹ |
NO |
NO |
NO |
NO |
NO |
REDISPLAY |
NO |
NO |
NO |
NO |
YES |
Next modifiable field² |
REDO |
NO |
NO |
NO |
NO |
NO |
Current field² |
Table 6 @FILL_ACTION Assignment Functions - Data Field Trigger
¹ Will execute final trigger before exiting
² Unless @NEXT_ITEM was set differently
Assignments |
Exit Form Operation |
Restart Form Operation |
Ring Bell |
Clear Data Entry Areas |
Update Data Entry Areas |
Cursor Position |
INVALID |
NO |
NO |
NO |
NO |
NO |
First modifiable field only |
RESTART |
NO |
YES |
NO |
YES |
YES |
First modifiable field only |
Table 7 @FILL_ACTION Assignment Functions - Final Trigger