Hello,
I am using the following code to import Access tables in SAS 9.4 TS Level 1M1:
libname PREP 'J:\Program Evaluation Section\Adolescent Education Programs\PREP\Data\SAS'; %macro imp (num=); PROC IMPORT OUT= prep.EBPMPC&num DATATABLE= "EBPM Planning Calendar Updated" DBMS=ACCESSCS REPLACE; DATABASE="J:\Program Evaluation Section\Adolescent Education Programs\PREP\Data\Access\300\&num..accdb"; SCANMEMO=YES; USEDATE=YES; SCANTIME=YES; MEMOSIZE=32767; textsize=30000; RUN; PROC IMPORT OUT= prep.CAL&num DATATABLE= "Cohort Attendance Log" DBMS=ACCESSCS REPLACE; DATABASE="J:\Program Evaluation Section\Adolescent Education Programs\PREP\Data\Access\300\&num..accdb"; SCANMEMO=YES; USEDATE=YES; SCANTIME=YES; MEMOSIZE=32767; RUN; PROC IMPORT OUT= prep.CFC&num DATATABLE= "Cohort Fidelity Checklist" DBMS=ACCESSCS REPLACE; DATABASE="J:\Program Evaluation Section\Adolescent Education Programs\PREP\Data\Access\300\&num..accdb"; SCANMEMO=YES; USEDATE=YES; SCANTIME=YES; MEMOSIZE=32767; RUN; PROC IMPORT OUT= prep.IS&num DATATABLE= "Implementation Sites" DBMS=ACCESSCS REPLACE; DATABASE="J:\Program Evaluation Section\Adolescent Education Programs\PREP\Data\Access\300\&num..accdb"; SCANMEMO=YES; USEDATE=YES; SCANTIME=YES; MEMOSIZE=32767; RUN; PROC IMPORT OUT= prep.PAL&num DATATABLE= "Participant Attendance Log" DBMS=ACCESSCS REPLACE; DATABASE="J:\Program Evaluation Section\Adolescent Education Programs\PREP\Data\Access\300\&num..accdb"; SCANMEMO=YES; USEDATE=YES; SCANTIME=YES; MEMOSIZE=32767; RUN; PROC IMPORT OUT= prep.PC&num DATATABLE= "Planned Curricula" DBMS=ACCESSCS REPLACE; DATABASE="J:\Program Evaluation Section\Adolescent Education Programs\PREP\Data\Access\300\&num..accdb"; SCANMEMO=YES; USEDATE=YES; SCANTIME=YES; MEMOSIZE=32767; RUN; PROC IMPORT OUT= prep.SNSC&num DATATABLE= "Site Name and Site Code" DBMS=ACCESSCS REPLACE; DATABASE="J:\Program Evaluation Section\Adolescent Education Programs\PREP\Data\Access\300\&num..accdb"; SCANMEMO=YES; USEDATE=YES; SCANTIME=YES; MEMOSIZE=32767; RUN; %mend imp; %imp(num=301);
Two columns of data are being truncated. These columns have something in common: "#" is a character in some of the cells. All other data is being imported properly and I am not receiving any error messages. Any advice for bringing in the data correctly?
Thank you!
They are text in Access and character in SAS. Trying to figure out ODBC - any introductory resource you can share? Thank you!
255 in Access. In SAS, one variables is 3, the other is 4. Is there a way to set length through proc import?
Thank you!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.