spss to sas

Reply
N/A
Posts: 1

spss to sas

Hi,

I am trying to import a spss data set into sas, but it seems that I loose some content on the way, meaning that my 1100 - long string is truncated to just 225.

I know that it is possible to extent the lenght of the variables, but so far I was not able to understand how to do it.

The sintax that I have used is:

PROC IMPORT

  DATAFILE=''

  OUT=

  DBMS=SAV replace;

run;

RUN;

Thank you

New Contributor
Posts: 4

Re: spss to sas

Posted in reply to individual

Hi There:

Check out the LRECL system option at

SAS(R) 9.2 Language Reference: Dictionary, Fourth Edition


Syntax


LRECL=n | nK | nM | nG | nT | hexX | MIN | MAX 

Syntax Description

n
specifies the logical record length in multiples of 1 (bytes); 1,024 (kilobytes); 1,048,576 (megabytes); 1,073,741,824 (gigabytes); or 1,099,511,627,776 (terabytes). For example, a value of 32 specifies 32 bytes, and a value of 32k specifies 32,767 bytes.

Super User
Posts: 11,343

Re: spss to sas

Posted in reply to individual

Another option if you have access to SPSS is to try exporting from SPSS to SAS. One additional advantage of this approach  is the option to create a SAS Format program file that will mimic SPSS value displays.

Super User
Posts: 19,770

Re: spss to sas

Posted in reply to individual

Try DBMS=SPSS instead of SAV

PROC IMPORT

  DATAFILE=''

  OUT=

  DBMS=SPSS replace;

run;

Ask a Question
Discussion stats
  • 3 replies
  • 278 views
  • 0 likes
  • 4 in conversation