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
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.
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.
Try DBMS=SPSS instead of SAV
PROC IMPORT
DATAFILE=''
OUT=
DBMS=SPSS replace;
run;
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.