Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

@SETF - Change work file and set position

&pagelevel(3)&pagelevel

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
unchanged. If no further operands are specified then the position in the
specified work file is set to the (logical) first line and first column.

0..22

Work file in which the position is to be set. The specified work file is set as
the current work file before positioning. Before EDT goes to the specified
work file any nesting of the work files undertaken with @PROC is undone.
If no further operands are specified then the specified work file is simply set
as the current work file and the line and column positions in the specified
work file remain unchanged.

An active work file cannot be specified as the current work file. If the user
attempts to do so, the message EDT4959 is issued.

GLOBAL

Positioning is performed simultaneously in all the work files. If no further
operands are specified then the position is set to the (logical) first line and
first column in all the work files.

line

Absolute specification of the vertical position. The user must specify the line
number which is to be displayed in the first line of the work window. If no line
with this line number is present then the position is set to an existing line
which has the next (higher) line number. If there is no such line then the
position is set to the existing line with the highest line number.

vpos

Relative vertical positioning statement. It is possible to specify +[n], ++,
–[n], –– as well as +([m[,...]]), ++([m[,...]]), –([m[,...]])
and ––([m[,...]]).

Here, m is one of the 9 possible record marks to which the position may be
moved. Multiple record marks can be specified.

Marks with special functions (e.g. mark 15 for write protection, see section
“Record marks”) are ignored here.


The relative positioning statement acts in the same way as the
corresponding statement (+[n], ++ etc.) in F mode if this is transferred with
[DUE] (see the corresponding statement). However, positioning with
@SETF is also possible in L mode (for example in procedures) or when
EDT is controlled via the subroutine interface.

col

Absolute specification of the horizontal position. The user must specify the
number of the column which is to be displayed as the first column in the
work window.

hpos

Relative horizontal positioning statement. It is possible to specify >[n],
<[n] and << .

The relative positioning statement acts in the same way as the
corresponding statement (>[n], << etc.) in F mode if this is transferred with
[DUE] (see the corresponding description). However, positioning with
@SETF is also possible in L mode (for example in procedures) or when
EDT is controlled via the subroutine interface.

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.