FastSort Manual

Using FastSort Commands
FastSort Manual429834-003
3-16
FROM Command
For an unstructured disk file, SORTPROG calculates an approximate number
of records in the file. The approximate number of records for an EDIT file is the
end-of-file length multiplied by 2 and divided by the record length. The
approximate number of records for other unstructured files is the end-of-file
location divided by the record length. The default record length for all
unstructured disk files is 132 bytes.
For files other than disk files, the default is 50,000 records.
MERGE
indicates that the records in in-file do not need sorting before FastSort merges
them with other input records. If you specify MERGE and the records are not
sorted, FastSort returns sort error 15 (FILES TO BE MERGED MUST BE
SORTED).
RECORD length
specifies the maximum input record length in number of bytes.
If in-file is a structured disk file, you can omit the RECORD parameter because
the length is in the file label. If in-file is an odd unstructured file, you must
specify the correct length for length.
Records are limited to 4080 bytes each. Data records in a command file are limited
to 2000 bytes each. The default length for unstructured file records is 132 bytes.
Records belonging to key-sequenced files with increased limits are not supported
using FastSort commands. Buffered interface of FastSort might be used to sort
records belonging to key-sequenced files with increased limits. For more
information about key-sequenced files with increased limits, see Enscribe
Programmer’s Guide.
Guidelines
Follow these guidelines when you use the FROM command.
Record Count
The value of count in the FILE parameter need not be the exact number of records in
the input file. However, you should overestimate the number of records rather than
underestimate the number.
If you underestimate the number of input records, FastSort might underestimate the
size of an output file or the size of the extended segment, which can cause FastSort
error 29. For more information about this error, see Appendix B, FastSort Error
Messages.