27.03.2013 Views

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Formats<br />

PRINT 1251<br />

• PRINT displays values for all user-defined variables in the working data file. The EXECUTE<br />

command executes PRINT.<br />

By default, PRINT uses the dictionary print formats. You can specify formats for some or all<br />

variables specified on PRINT. For a string variable, the specified format must have a width at<br />

least as large as that of the dictionary format. String values are truncated if the specified<br />

width is smaller than that of the dictionary format.<br />

• Format specifications can be either column-style or FORTRAN-like (see DATA LIST). The<br />

column location specified with column-style formats or implied with FORTRAN-like<br />

formats refers to the column in which the variable will be displayed.<br />

• A format specification following a list of variables applies to all of the variables in the<br />

list. Use an asterisk to prevent the specified format from applying to variables preceding<br />

the asterisk. The specification of columns locations implies a default print format, and<br />

that format will apply to all previous variables if no asterisk is used.<br />

• Printable numeric formats are F, COMMA, DOLLAR, CC, DOT, N, E, PCT, PIBHEX, RBHEX,<br />

Z, and the date and time formats. Printable string formats are A and AHEX. Note that hex<br />

and binary formats use different widths. For example, the AHEX format must have a width<br />

twice that of the corresponding A format. For more information on specifying formats and<br />

on the formats available, see DATA LIST and “Variable Formats” on p. 25 in Volume I.<br />

• Format specifications are in effect only for the PRINT command. They do not change the<br />

dictionary print formats.<br />

• When a format is specified for a variable, the automatic blank following the variable in<br />

the output is suppressed. To preserve the blank between variables, use a string (see<br />

“Strings” on p. 1252), specify blank columns in the format, or use an X or T format<br />

element (see DATA LIST for information on X and T).<br />

Example<br />

PRINT / TENURE (F2.0) ’ ’ MOHIRED YRHIRED DEPT *<br />

SALARY85 TO SALARY88 (4(DOLLAR8,1X)) NAME.<br />

EXECUTE.<br />

• Format F2.0 is specified for TENURE. A blank string is specified after TENURE because<br />

the automatic blank following the variable is suppressed by the format specification.<br />

• MOHIRED, YRHIRED, and DEPT are displayed with default formats because the asterisk<br />

prevents them from receiving the DOLLAR8 format specified for SALARY85 to SALARY88.<br />

The automatic blank is preserved for MOHIRED, YRHIRED, and DEPT, but the blank is<br />

suppressed for SALARY85 to SALARY88 by the format specification. The 1X format<br />

element is therefore specified with DOLLAR8 to add one blank after each value of<br />

SALARY85 to SALARY88.<br />

• NAME uses the default dictionary format.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!