When the merge option is specified in the bsrtopen function and records to be merged are passed to PowerBSORT and when the records from the merge result are received from PowerBSORT, the bsrtmrge function is used.
Format
#include "bsrt.h" BSRTFUNC func; (Note) int func.bsrtmrge(BSPTR_BSRTREC rec);
NOTE
func is a parameter specified in thebsrtopen function.
Function explanation
The function of the bsrtmrge function is shown below.
Records to be merged are passed from user applications to PowerBSORT.
The records from the merge result are returned from PowerBSORT to the user application.
The end of the string is notified to PowerBSORT. A group of records that have been sorted is called a string.
The end of the record from merge result is notified from PowerBSORT to the user application.
Parameter detail
In the following, it explains the parameter of the bsrtmrge function.
rec
This specifies rec specified in bsrtopen function.
Information
BSPTR_BSRTREC is a pointer of BSRTREC structure.
Return value
The return values of the bsrtmrge function are as follows.
Return value | Meaning |
---|---|
0 | This shows that the bsrtmrge function ended normally. |
1 | This shows that the bsrtmrge function ended normally. |
-1 | This shows that an error occurred in the bsrtmrge function. |