Guardian Procedure Errors and Messages Manual

15 EDITREAD and EDITREADINIT Errors
This section lists and describes the errors returned in the status parameter of EDITREAD and
EDITREADINIT procedure calls.
Error Codes
This subsection lists each EDITREAD and EDITREADINIT procedure error code and provides a
description of each code.
0 or greater NO ERROR
Cause The call was completed successfully. For EDITREAD, a positive value represents the number
of characters that the procedure read in the text line.
Effect None.
Recovery No corrective action is required.
-1 END-OF-FILE ENCOUNTERED
Cause The procedure encountered an end-of-file in the EDIT file.
For EDITREADINIT, this means the file was empty.
For EDITREAD, this condition might indicate that the reading of the file is finished.
Effect The procedure sets the error code and returns without performing the requested function.
Recovery Corrective action is application-dependent.
-2 I/O ERROR
Cause A file-system error occurred.
Effect The procedure sets the error code and returns without performing the requested function.
Recovery Call FILEINFO to obtain the file-system error, and see “File-System Errors” (page 19) for
corrective action.
-3 TEXT FILE FORMAT ERROR
Cause EDITREADINIT returns this error if any of the following is true:
The file was not an EDIT file.
The buffer length was not a power of two in the range 64 through 2048.
The directory claims the file contains a line with a sequence number greater than 99999.999.
The file is internally inconsistent.
For EDITREAD, an error exists in the internal format of the file.
Effect The procedure sets the error code and returns without performing the requested function.
Recovery For recovery suggestions for files formatted as EDIT files, see the EDIT User's Guide and
Reference Manual.
-4 SEQUENCE NUMBER ERROR
222 EDITREAD and EDITREADINIT Errors