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.

768 IMPORT<br />

Subcommand Order<br />

• FILE and TYPE must precede all other subcommands.<br />

• No specific order is required between FILE and TYPE or among other subcommands.<br />

Operations<br />

Example<br />

• The portable data file and dictionary become the working data file and dictionary.<br />

• A file saved with weighting in effect (using the WEIGHT command) automatically uses<br />

the case weights when the file is read.<br />

IMPORT FILE=NEWDATA /RENAME=(V1 TO V3=ID,SEX,AGE) /MAP.<br />

• The working data file is generated from the portable file NEWDATA.<br />

• Variables V1, V2, and V3 are renamed ID, SEX, and AGE in the working file. Their names<br />

remain V1, V2, and V3 in the portable file. None of the other variables copied into the<br />

working file are renamed.<br />

• MAP requests a display of the variables in the working data file.<br />

FILE Subcommand<br />

FILE specifies the portable file. FILE is the only required subcommand on IMPORT.<br />

TYPE Subcommand<br />

TYPE indicates whether the portable file is formatted for magnetic tape or for a communications<br />

program. TYPE can specify either COMM or TAPE. For more information on magnetic<br />

tapes and communications programs, see EXPORT.<br />

COMM Communications-formatted file. This is the default.<br />

TAPE Tape-formatted file.<br />

Example<br />

IMPORT TYPE=TAPE /FILE=HUBOUT.<br />

• The file HUBOUT is read as a tape-formatted portable file.<br />

DROP and KEEP Subcommands<br />

DROP and KEEP are used to read a subset of variables from the portable file.

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

Saved successfully!

Ooh no, something went wrong!