HOW TO: open a database in SAS / SPSS:

Similarly to SPSS one can call a database and ask for full description of the content.

In the case of SPSS one could do:

GET
     SAS DATA='D:\DATA\data.sas7bdat'.
DATASET NAME CC WINDOW=FRONT.

DISPLAY DICTIONARY .

 

As where in the case of SAS we chould do:

options nocenter;
proc contents position data=' D:\DATA\data';
 run;

'options noncenter' is just giving a format for how the output will look (asking for it be justifyed to the left of the screen).  Only the second syntax line, is mimicing the 'display dictionary', in order to display the contents of the database.

'run' is the simil to execute in the case of spss, or just the ';' in the case of mplus.

 

1 comments:

Anonymous said...

Great post! What about converting a whole directory of SAS datasets to SPSS files. To convert SAS to SPSS files like what SAS2SPSS app does, but what is the code functions for directories. All help is appreciated. Note: I don't have SAS just SAS files so unreadable until imported, but I have like 300.

http://www.the-chronicon.com/p/sas2spss.html

Post a Comment