You use indirect positioning when you either change data directly in the data zone or give a command that changes the position of the current line as a side effect.
If you change data directly, the lowest line that was changed becomes the current line after you have pressed the return key.
In commands that change data, the last line changed becomes the current line. When you delete lines, the previous line becomes the current line. When you insert lines, the last inserted line becomes the current one. The individual explanations of the commands in section The Commands in Detail take account of the behaviour of the current line, i.e. whether it is moved and if yes, what the rules are.
There is a number of commands for direct positioning of the current line. Forward, i.e. towards the end of the file, you apply one of these commands:
next
down
+
- all of them are identical with regard to parameters and execution. The number of records by which you want to move the current line is either 1 (if you do not specify a parameter) or the number n you specified in the command. If you go too far, for example, when you give the command NEXT 5 while the current line is 3 lines in front of the last line, you receive the error message
End of data
and the current line stays where it is.
If you want to position the current line on the last data line, you use the command
bottom
Backward, i.e. towards the beginning of the file, you position the current line with one of these commands:
back
up
-
- these three are all identical with regard to parameter and execution, as well. They work equivalently to the commands for the forward movements; the only difference is that the error message reads
Begin of data
if you try to go beyond the file.
top
you position the current line on the top line. If you want to move the current line on the first data line, you may enter
top; next
You can use the command POINT to set the current line to the record given with the command, e.g.
point 400
po f
With the command RETURN you can position the current line on a record you have marked before. You find more details on this subject in section Setting of and Going To Markers.
A special kind of positioning is leafing through a file, which will be discussed in the following section.