BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
gjenkins3
Fluorite | Level 6

Hello,

 

I've been analyzing survey data in SPSS and want to import it into SAS so that I can begin to learn how to conduct similar analyses in SAS. There are up to 59 observations per variable. However, when I try to input variables from the .sav file into a SAS dataset, it gives me 1086 rows, most of which are missing. In addition, it reports values for several hundred observations which never occurred. Like I said, there should only be 59 observations, at most, per variable.

 

Here's the code I am using (with slight redactions for security):

 

data proceval;

infile '/folders/myfolders/sasuser.v94/XXXX process Evaluation Survey 9.2.17.sav';

input [VariableName] [VariableName];

run;

 

 

What could be causing this???

 

Thanks so much!

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

You don't use a data step to import an SPSS file, you use PROC IMPORT.

You should move your files out of the SASUSER folder and create a custom folder under myfolders that you can use, IMO. 

 

proc import out=procEval datafile='/folders/myfolders/xxx 9.2.17.sav' DBMS=SPSS replace; run;

View solution in original post

1 REPLY 1
Reeza
Super User

You don't use a data step to import an SPSS file, you use PROC IMPORT.

You should move your files out of the SASUSER folder and create a custom folder under myfolders that you can use, IMO. 

 

proc import out=procEval datafile='/folders/myfolders/xxx 9.2.17.sav' DBMS=SPSS replace; run;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 600 views
  • 1 like
  • 2 in conversation