PRINT OUTFILE='filename' RECORDS=n_lines {NOTABLE,TABLE} /[line_no] arg... arg takes one of the following forms: 'string' [start-end] var_list start-end [type_spec] var_list (fortran_spec) var_list *
The PRINT transformation writes variable data to an output file. PRINT is executed when a procedure causes the data to be read. Follow PRINT by EXECUTE to print variable data without invoking a procedure (see EXECUTE).
All PRINT subcommands are optional.
The OUTFILE subcommand specifies the file to receive the output. The file may be a file name as a string or a file handle (see FILE HANDLE). If OUTFILE is not present then output will be sent to PSPP's output listing file.
The RECORDS subcommand specifies the number of lines to be output. The number of lines may optionally be surrounded by parentheses.
TABLE will cause the PRINT command to output a table to the listing file that describes what it will print to the output file. NOTABLE, the default, suppresses this output table.
Introduce the strings and variables to be printed with a slash (/). Optionally, the slash may be followed by a number indicating which output line will be specified. In the absence of this line number, the next line number will be specified. Multiple lines may be specified using multiple slashes with the intended output for a line following its respective slash.
Literal strings may be printed. Specify the string itself. Optionally the string may be followed by a column number or range of column numbers, specifying the location on the line for the string to be printed. Otherwise, the string will be printed at the current position on the line.
Variables to be printed can be specified in the same ways as available for DATA LIST FIXED (see DATA LIST FIXED). In addition, a variable list may be followed by an asterisk (*), which indicates that the variables should be printed in their dictionary print formats, separated by spaces. A variable list followed by a slash or the end of command will be interpreted the same way.
If a FORTRAN type specification is used to move backwards on the current line, then text is written at that point on the line, the line will be truncated to that length, although additional text being added will again extend the line to that length.