Overview (OUTPUT NEW command)
The OUTPUT
commands
(OUTPUT NEW
, OUTPUT
NAME
, OUTPUT ACTIVATE
, OUTPUT OPEN
, OUTPUT SAVE
, OUTPUT CLOSE
) provide the ability to programmatically
manage one or many output documents. These functions allow you to:
- Save an output document through syntax.
- Programmatically partition output into separate output documents (for example, results for males in one output document and results for females in a separate one).
- Work with multiple open output documents in a given session, selectively appending new results to the appropriate document.
The OUTPUT NEW
command creates
a new output document, which becomes the designated output document.
Subsequent procedure output is directed to the new output document
until the document is closed or another output document is created,
opened, or activated.
Basic Specification
The basic specification for OUTPUT NEW
is simply the command name.
TYPE Keyword
This keyword is obsolete and is ignored. The only valid output
type is Viewer. Draft Viewer format is no longer supported. To produce
text output equivalent to Draft Viewer output use OMS
. See the topic OMS for more information.
NAME Keyword
By default, the newly created output document is provided with
a unique name. You can optionally specify a custom name for the output
document, overriding the default name. The document name is used to
reference the document in any subsequent OUTPUT ACTIVATE
, OUTPUT SAVE
, and OUTPUT CLOSE
commands.
- The specified name must conform to variable naming rules. See the topic Variable Names for more information.
- If the specified name is associated with another document, that association is broken and the name is associated with the new document. The document previously associated with the specified name is assigned a new unique name.
Syntax Rules
- An error occurs if a keyword is specified more than once.
- Keywords must be spelled in full.
- Equals signs (=) used in the syntax chart are required elements.
Operations
The new output document is opened in a window in the user interface and becomes the designated output window.
Limitations
Because each window requires a minimum amount of memory, there is a limit to the number of windows, IBM® SPSS® Statistics or otherwise, that can be concurrently open on a given system. The particular number depends on the specifications of your system and may be independent of total memory due to OS constraints.
Example
GET FILE='/examples/data/Males.sav'.
FREQUENCIES VARIABLES=ALL.
OUTPUT SAVE OUTFILE='/examples/output/Males.spv'.
OUTPUT NEW.
GET FILE='/examples/data/Females.sav'.
FREQUENCIES VARIABLES=ALL.
OUTPUT SAVE OUTFILE='/examples/output/Females.spv'.
-
FREQUENCIES
produces summary statistics for each variable in /examples/data/Males.sav. The output fromFREQUENCIES
is added to the designated output document (one is created automatically if no output document is currently open). -
OUTPUT SAVE
writes the contents of the designated output document to /examples/output/Males.spv. -
OUTPUT NEW
creates a new Viewer document, which becomes the designated output document. - The subsequent
FREQUENCIES
command produces output for females using the data in /examples/data/Females.sav.OUTPUT SAVE
writes this output to /examples/output/Females.spv.
As shown in this example, OUTPUT NEW
allows you to direct results
to an new output document. If OUTPUT NEW
were not specified, /examples/output/Females.spv would contain frequencies for both males and females.