FastSort Manual

Sorting Interactively
FastSort Manual429834-003
2-3
Running With Input From a Command File
Running With Input From a Command File
In the following example, a command file named COMFILE contains FastSort
commands and input records. To execute COMFILE and send the output to the list file
named LISTFILE, you would enter:
10> SORT / IN COMFILE, OUT LISTFILE, NOWAIT /
The SORT process reads the commands and data from COMFILE and initiates a
SORTPROG process to sort the data. The SORT process uses the FastSort system
procedures described in Section 5, Using FastSort System Procedures to
communicate with the SORTPROG process. The NOWAIT parameter is optional.
Listed below are the contents of sample command file COMFILE:
! Send sorted records to the file named TOFILE.
! Sort in descending order from column 1 to 10.
TO TOFILE
DESC 1 FOR 10
RUN
apple
orange
lemon
grapefruit
banana
grape
watermelon
FastSort creates an output data file named TOFILE and a list file named LISTFILE.
Listed below are the contents of sample output file TOFILE, which contains the records
sorted in descending order.
watermelon
orange
lemon
grapefruit
grape
banana
apple
Shown below is a sample LISTFILE, which contains:
The FastSort banner
The contents of the command file including comments, commands, and data
Statistics information for the sort run
Any errors or warnings that occurred during the run