FastSort Manual
Sorting Programmatically
FastSort Manual—429834-003
4-6
Returning Output Records to a Process
Returning Output Records to a Process
To have SORTPROG return records to your application, use the
SORTMERGERECEIVE procedure as follows:
1. Call SORTMERGESTART.
2. Call SORTMERGERECEIVE to return each record until SORTPROG returns –1 in
the length parameter of SORTMERGERECEIVE. A length of –1 means that
SORTPROG has returned all the output records.
Figure 4-3 on page 4-7 shows how an application process accepts sorted records from
SORTPROG.
Figure 4-2. Sending Input Records From an Application Process
•
•
•
•
SORTMERGESTART
•
•
•
•
•
•
SORTMERGESEND
•
•
SORTMERGESEND
•
•
SORTMERGESEND
•
•
SORTMERGESEND
•
•
•
SORTMERGESTATISTICS
•
SORTMERGEFINISH
•
•
•
SORTPROG
•
•
•
•
Input Record
Input Record
Last Input Record
Completion
Statistics
Application
Process
SORTPROG
Process
FastSort
Parameters
Record Length = -1
Output
Sorted
Records
VST402.vsd