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.

RECODE 1339<br />

• If RECODE encounters a value that cannot be converted, it scans the remaining value<br />

specifications. If there is no specific recode specification for that value, the target variable<br />

will be system-missing for that case.<br />

Example<br />

RECODE #JOB (CONVERT) (’-’=11) (’&’=12) INTO JOB.<br />

• RECODE first recodes all numbers in string variable #JOB to numbers. The target variable<br />

is JOB.<br />

• RECODE then specifically recodes the minus sign (the “eleven” punch) to 11 and the<br />

ampersand (or “twelve” punch in EBCDIC) to 12. Keyword CONVERT is specified first<br />

as an efficiency measure to recode cases with numbers immediately. Blanks are recoded<br />

to the system-missing value.<br />

Example<br />

RECODE #JOB (’ ’=-99) (CONVERT) (’-’=11) (’&’=12) INTO JOB.<br />

• The result is the same as in the above example, except that blanks are changed to −99.

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

Saved successfully!

Ooh no, something went wrong!