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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

24 Universals<br />

• System variables are not available for procedures.<br />

$CASENUM Permanent case sequence number. For each case, $CASENUM is the number<br />

of permanent cases read up to and including that case. The format is F8.0.The<br />

value of $CASENUM is not necessarily the row number in a Data Editor<br />

window (available in windowed environments).<br />

$SYSMIS System-missing value. The system-missing value displays as a period (.) or<br />

whatever is used as the decimal point.<br />

$JDATE Current date in number of days from October 14, 1582 (day 1 of the<br />

Gregorian calendar). The format is F6.0.<br />

$DATE Current date in international date format with two-digit year. The format is<br />

A9 in the form dd-mmm-yy.<br />

$DATE11 Current date in international date format with four-digit year. The format is<br />

A11 in the form dd-mmm-yyyy.<br />

$TIME Current date and time. $TIME represents the number of seconds from<br />

midnight, October 14, 1582, to the date and time when the transformation<br />

command is executed. The format is F20.<br />

$LENGTH The current page length. The format is F11.0. For more information, see SET.<br />

$WIDTH The current page width. The format is F3.0. For more information, see SET.<br />

Scratch Variables<br />

Scratch variables are variables created for the sole purpose of facilitating operations during<br />

a session.<br />

• To create a scratch variable, specify a variable name that begins with the # character—<br />

for example, #ID. Scratch variables can be either numeric or string.<br />

• Scratch variables are initialized to 0 for numeric variables or blank for string variables.<br />

• SPSS does not reinitialize scratch variables when reading a new case. Their values are<br />

always carried across cases. Therefore, a scratch variable is a good choice for a looping<br />

index.<br />

• Do not use LEAVE with a scratch variable.<br />

• Scratch variables cannot be used in procedures and cannot be saved in a data file.<br />

• Scratch variables cannot be assigned missing values, variable labels, or value labels.<br />

• Scratch variables can be created between procedures but are always discarded as the next<br />

procedure begins.<br />

• Scratch variables are discarded once a TEMPORARY command is specified.<br />

• The keyword TO cannot refer to scratch variables and permanent variables at the same<br />

time.<br />

• Scratch variables cannot be named on a WEIGHT command.

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

Saved successfully!

Ooh no, something went wrong!