The current work file can be written to a SAM file using the old @WRITE statement (format 2). This may either exist or can be created before the write operation. The work file is retained after writing.
Existing SAM files with a fixed record length can only be overwritten in the same record format if this file attribute has been stored with the file name and the fixed file link name EDTSAM
in the Task File Table
before the @WRITE statement is executed.
If a new SAM file is created before the write operation then the default attributes are generally used. If file attributes other than the default attributes are used then they must be stored together with the file name and the fixed file link name EDTSAM
in the Task File Table
before the @WRITE statement.