WWW | Community | Store | Account | Contact Us
SHAZAM Homepage

WRITE

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:

OPTION DESCRIPTION
append 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.
beg= 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.
binary 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.
byvar 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.
close 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.
end= 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.
format 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.
dif 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.
names 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.
nobyvar 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.
norewind 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 WIDE uses 120 columns and NOWIDE uses 80 columns. The default setting is described in the SHAZAM Reference Manual chapter SET AND DISPLAY.