The EXTEND procedure opens an existing file, positions the file buffer after the last component, and prepares it for writing. It is commonly used to append to a file. Syntax: EXTEND( file_variable [[, file_name]] [[, ERROR := error-recovery]] ); The 'file_variable' is the name of the file variable associated with the output file. The 'file_name' is the name of the file to be associated with the 'file_variable'. If the file was opened with the OPEN procedure, the 'file_name' is ignored. The 'error-recovery' is the action to be taken if an error occurs during execution of the routine. The file can be in any mode before EXTEND is called to set the mode to generation. If the file is an external file and is not already open, EXTEND opens it using the defaults for the OPEN procedure. After execution of EXTEND, the file is positioned after the last component, and EOF and UFB return TRUE. If the file does not exist, EXTEND does not create it, but returns an error at run time. A call to EXTEND on a relative file opened for direct access positions the file after its last existing component. A call to EXTEND on an indexed file opened for random access by key positions the file after the last component relative to the primary key. See the "HP Pascal Language Reference Manual" for a complete description of the EXTEND procedure.