The current work file can be written back to a file with @CLOSE provided that this has been previously read in or created with @OPEN (format 1). After the write operation, the file is closed and the work file is deleted.
The current work file can be written to a new file with @WRITE (format 1). The work file is retained after writing.
The current work file can be written to an existing file with @WRITE (format 1). This completely replaces the old file content. The work file is retained after writing.
The current work file can be written back to the file opened with @OPEN (format 1) with @WRITE (format 1). The file remains open after writing and the work file is retained.
If a new SAM or ISAM file is created before the write operation then the file type's default attributes are generally used. If file attributes other than the defaults are to be used then they must be stored in the Task File Table
together with a freely definable file link name before the @OPEN or @WRITE statement is called and the call to the @OPEN or
@WRITE statement must use this file link name.