COBOL Manual for TNS/E Programs (H06.08+, J06.03+)

Usage Considerations:
Error Detection and Reporting
If the process calls COBOL_RETURN_SORT_ERRORS_ before it executes a SORT or MERGE
statement, the HP COBOL run-time library returns the appropriate values in error-info
after execution of a a RELEASE, RETURN, SORT, or MERGE statement.
If the sort/merge routines do not detect errors during the execution of one of the above
statements, sort-code is set to 0 and the contents of the other data items is undefined
(unpredictable).
If the sort/merge routines do detect an error, the HP COBOL run-time routines terminate
execution of the sort process and return to the program with the fields of error-info set
to the values returned by the sort/merge routines. The HP COBOL run-time routines do not
produce error messages of their own (they typically go to the home terminal), and no recovery
is possible.
It is your responsibility to determine whether the operation is successful, and to determine how
to proceed. If the error happened during execution of a RELEASE or RETURN statement,
execution should proceed to the end of the input or output procedure, at which point it continues
after the SORT or MERGE statement.
If an error occurs without the process ever having made a call to
COBOL_RETURN_SORT_ERRORS_ (or if the error-report parameter was omitted, cancelling
further error reporting), the HP COBOL run-time library processes sort errors, prints a message
on the error file (normally the home terminal) that has all of the above information, and
abnormally terminates the run unit.
COBOL_REWIND_SEQUENTIAL_
The COBOL_REWIND_SEQUENTIAL_ routine enables you to reposition a sequential disk or
single-file tape file to its beginning without closing and reopening it.
library-reference
is a mnemonic-name in the SPECIAL-NAMES paragraph. This mnemonic-name is associated
with the DLL containing an object copy of COBOL_REWIND_SEQUENTIAL_.
file-name
is the name of a COBOL data file; that is, a file described in a File Description entry. It must
be an FD name associated with a file name that specifies an unstructured or entry sequenced
file.
return-code
is an identifier of a numeric data item in which an error value will be returned. The expected
values and their respective meanings are:
MeaningValue
Successful execution0
620 Libraries and Utility Routines