FastSort Manual

Sorting Programmatically
FastSort Manual429834-003
4-4
Sending Input Records From a Process
Sending Input Records From a Process
FastSort can accept records up to 27,648 bytes in buffers of 32 KB from an application
process. For input records of size greater than 4072 bytes, only buffered interface must
be used.To send input records from your process to a SORTPROG process, use the
SORTMERGESEND procedure as follows:
1. If you want to use record blocking, call SORTBUILDPARM.
2. Call SORTMERGESTART to start SORTPROG.
3. Call SORTMERGESEND to send each record. Specify certain parameters for a
sort run or a merge run, as the following subsections explain.
4. Call SORTMERGESEND with a length parameter of –1 to tell SORTPROG that
the last record has been sent.
Figure 4-1. Sorting and Merging With Input and Output Files
SORTMERGESTART
SORTMERGESTATISTICS
SORTMERGEFINISH
FastSort
Parameters
Application
Process
SORTPROG
Process
File 1
Input
Unsorted
Records
Input
Sorted
Records
File 2
Completion
Statistics
SORTPROG
Output
Sorted and
Merged
Records
VST401.vsd