IBM Professional Series User Manual page 115

Virtual machine
Table of Contents

Advertisement

You enter the SORT command on the command line. Its
format is:
SORT number-of-lines column1 column2
You substitute the number of lines you want sorted for
"number-of-lines." You can substitute an asterisk (*) here
when you want all lines, from the current line to the last, to
be sorted. "columnl" is the first column in the sort field.
"column2" is the last column.
The SORT command begins with the current line, so you
need to make the first line you want sorted the current line.
If
you're sorting numbers and want them in descending
order, from highest to lowest, type a letter "d" in the SORT
command, before the first column number. The "d" stands
for "descending order."
(If
you don't type a "d," the file is
sorted in ascending order.)
For example, the command:
===>
sort
*
d 1
4
would sort the numbers in columns 1 through 4, from the
current line to the end of the file, in descending order.
CMS SORT Command: The eMS SORT command allows
you to sort information without requiring you to edit the file.
If,
for example, you want to sort the information in the file
RADIO WAVES A by frequency and store the result in a
file called RADIO FREQS A, type the following information
on the eMS command-line:
SORT RADIO WAVES A RADIO FREQS A
The eMS SORT command will ask you to specify which
columns bound the fields on which you want the file sorted.
You can specify up to 253 pairs of numbers, each pair
designating the starting and ending columns of a data field to
be used for sorting the file. SORT will use the leftmost pair
of numbers as the major sort field. When the SORT is
complete, you will have two files on your A-DISK: the
original RADIO WAVES and a new file RADIO FREQS,
5-24
VM/PC Users Guide

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Vm/pc

Table of Contents