Numbering Lines Of A File; Sorting A File - IBM Professional Series User Manual

Virtual machine
Table of Contents

Advertisement

If
you QUIT when you really meant to enter a FILE
command, you would then enter FILE. But if you intend to
quit, enter QQUIT, as the message says, on the command
line. You can enter an abbreviation, QQ.
When you get a copy of a file on your screen just to look at
it, not to change it, it's better to QUIT instead of FILE when
you're finished. The FILE command tells the editor to
rewrite the changed file over the old file on disk. Because
you haven't made any changes, you really don't need to have
the editor rewrite the file. The QUIT command is faster
because the editor doesn't have to rewrite the file.
Numbering Lines of a File
When you used the GET command to insert part of a file,
you had to know the starting line number and the number of
lines you wanted to insert. You use the SET NUMBER ON
command to number the lines of the file. Its format is:
SET NUMber ON
The line numbers appear in the prefix area, replacing the five
equal signs. Lines are numbered from the first line of the
file, not from the first line on the screen.
The line numbers aren't placed on disk when you enter FILE
or QUIT.
If
you want line numbers the next time you edit
the file, you'll have to enter the SET NUMBER ON
command again.
If
you no longer need the line numbers, enter:
SET NUMber OFF
Sorting a File
XEDIT Sort: Starting with the current line, the XEDIT
SORT command arranges a specified number of lines
according to sort fields.
If
each line of your file started with
a name, this would be a field you might choose to sort by.
You determine the starting and ending columns of the
longest name and use them as a parameter on the sort
command.
Chapter 5. Using VM/PC Commands to Do Work
5-23

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Vm/pc

Table of Contents