The @SETF statement sets the vertical and horizontal position of the work window for a work file either with or without changing the current work file.
Operation | Operands | F mode, L mode |
@SETF | [ {$0..$22 | GL OBAL | (0..22) } ] [ {line | vpos} ] [ {:col | hpos} ] ] |
$0..$22 | Work file in which the position is to be set. The current work file remains |
0..22 | Work file in which the position is to be set. The specified work file is set as An active work file cannot be specified as the current work file. If the user |
GLOBAL | Positioning is performed simultaneously in all the work files. If no further |
line | Absolute specification of the vertical position. The user must specify the line |
vpos | Relative vertical positioning statement. It is possible to specify Here, Marks with special functions (e.g. mark 15 for write protection, see section |
The relative positioning statement acts in the same way as the | |
col | Absolute specification of the horizontal position. The user must specify the |
hpos | Relative horizontal positioning statement. It is possible to specify The relative positioning statement acts in the same way as the |
If @SETF is specified without any operands then the position in the current work file is set to the (logical) first line and first column. If @SETF is specified without positioning operands then @SETF (n) simply changes the current work file. All the positions are retained. If @SETF $n or @SETF GLOBAL is specified then the position in the relevant work files is set to the (logical) first line and first column.
The abbreviation #
may only be entered in F mode. At least one operand must be specified. Otherwise, the #
statement (output last statement) is executed.
The setting for the window position is saved separately for the upper and lower (possible) data windows corresponding to each work file. The effect of the set position depends on the visibility of the affected window and possibly on the current input window. This applies equivalently for input in L mode where visibility and input window refer to a possible switch to F mode (with the @EDIT FULL statement). The corresponding information can be displayed in L mode using @STATUS=PAR(..).
In the case of non-visible work files, the position is set for the upper window.
If an affected work file is visible in precisely one window (upper or lower) then the positioning instructions apply to this window irrespective of which window is the input window.
If a work file is visible in both windows when the screen is split then only the input window is positioned.
Note
If @SETF is used to make settings for work files (GLOBAL
or $0..$22
operand), these no longer temporarily become the current work file as they do in compatibility mode. The restrictions and side effects described there do not therefore occur in Unicode mode.
Example
This example assumes that work file 1 already contains records and that @PAR LOWER=ON is set.
EDT is to switch to work file 1 and set the position there to line number 4, column 3.
The switch to work file 1 and the positioning operation have been performed.