The WRITE command allows selected data from SHAZAM to be written to a file by using the WRITE command.
In general, the formats of the WRITE command are:
WRITE (unit) vars / options
WRITE (filename) vars / options
The available options are:
||Append the data to the existing data file. If this option is not used then if the data file exists it will be replaced with the new data.
||Sets a sample BEGinning which overrides the sample size set on the latest SAMPLE command. The sample size set by this option will only be used for the current command. Subsequent problems will be performed according to the sample range set by the latest SAMPLE command.
||Specifies variables will be written into the specified file in Double Precision BINARY. If the FILE command is used to assign the BINARY file, follow the instructions for the FILE command in the SHAZAM Reference Manual and be sure to include a decimal point (.) after the unit number.
||The data is to be written variable by variable rather than observation by observation. When this option is used, the data for each new variable will begin on a new line.
||Closes a file that was opened for a WRITE command. If this option is used, the file will no longer be assigned to the unit number as specified with the FILE command.
||Sets a sample ENDing which overrides the sample size set on the latest SAMPLE command. The sample size set by this option will only be used for the current command. Subsequent problems will be performed according to the sample range set by the latest SAMPLE command.
||The data is written according to the FORMAT previously specified on the FORMAT command. The format will be stored in a SHAZAM variable called FORMAT. Details on the FORMAT command are given in the SHAZAM Reference Manual.
||WRITEs data to a DIF file. DIF files can be read by spreadsheet programs. Refer to the section on USING DIF FILES in the SHAZAM Reference Manual.
||Specifies that the variable names are to be included as the first line in the data set. A line terminated with ampersand indicates that the next line is a continuation line.
||Used when the data is to be written observation by Observation rather than variable BY VARiable. Observations deleted by the SKIPIF command or the expanded form of the SAMPLE command are included when this option is used. This option is the default.
||When multiple WRITE commands are used the data file will be overwritten by each WRITE command. That is, the REWIND option is the default. The NOREWIND option will write data sequentially to a file that has been used in a previous WRITE command.
||WIDE uses 120 columns and NOWIDE uses 80 columns. The default setting is described in the SHAZAM Reference Manual chapter SET AND DISPLAY.