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!
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.