Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (D-E)
Guardian Procedure Calls Reference Manual—522629-013
4-102
EDITREAD Procedure
>= 0 Indicates that the reading of the file was successful. This is the actual 
number of characters in the text line. However, no more than 
bufferlen 
bytes are transferred into 
buffer.
< 0 Indicates an unrecoverable error, where:
-1 End of file encountered
-2 Error occurred while reading
-3 Text file format error
-4 Sequence error. The sequence number of the line just read is less 
than its predecessor.
-5 Checksum error. EDITREADINIT was not called or the user has 
altered the edit control block. (This will not be returned if processing a 
reposition.)
-6 Invalid buffer address. Edit control block was not within lower half of 
user data stack.
edit-controlblk input, output
INT:ref:*
is an uninitialized array that is declared globally. The length in words of the edit 
control block must be at least 40 plus (
bufferlen / 2). This control block is 
returned by EDITREADINIT and should be used in each call to EDITREAD. Do 
not modify it between calls.
buffer output
STRING:ref:*
is an array where the text line is to be transferred.
bufferlen input
INT:value
is the length, in bytes, of the 
buffer array. This specifies the maximum number of 
characters in the text line that is transferred into 
buffer.
sequence-num output
INT(32):ref:1
returns the sequence number multiplied by 1000, in double-word integer form, of 
the text line just read.
Example
COUNT := EDITREAD (CONTROL^BLOCK , LINE , LENGTH , SEQ^NUM);










