I'm out of practice with coding and attempting to import data from an Excel file, specifying that all variables should be CHAR (as I'll be appending the new dataset to an existing SAS dataset with CHAR variables). Not sure why the following Proc Import code results in an error: DBDSOPTS statement not valid or used out of proper order. Is there a better way to do this? (SAS Enterprise Guide 8.3). proc import
datafile="\path\filename.xlsx"
out= NewDataset
dbms = xlsx
replace;
getnames=yes;
DBDSOPTS="DBTYPE=(ID_nbr='CHAR(6)' City ='CHAR(50)')";
run;
proc append
base=ExistingDataset data=NewDataset;
run; The variables in the two dataset will need to match in terms of data type and length before appending. Coding using the Length statement did not work out, either.
... View more