BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I am importing a series of Access tables using the Import procedure in a macro. Here is a sanitised version of the code.

PROC IMPORT OUT = CBADEF.DEF_&Year.
DATATABLE = "def"
DBMS =ACCESS97 REPLACE;
DATABASE = "\\my\data\base\&Year..mdb";
SCANMEMO = YES;
USEDATE = NO;
SCANTIME = YES;
RUN;

Firstly, while the procedure is running, the Task manager says "Running proc Sql...", although the log reports as follows:

NOTE: PROCEDURE IMPORT used (Total process time):
real time 28.18 seconds
cpu time 6.53 seconds

I have already had grief at the hands of importing Excel using the wizards because the PCFF product isn't being used and my long comment lines, or multi line cells are being corrupted. That issue is documented in an SN, but I can't seem to find any way to force the EG import wizard to use PCFF if it is licensed. Now I wonder which is misleading, the task manager or the log!

When you import using the same code within a standalone session, a column called "SEC/C" on Access is being renamed to "SEC_C". However, EG 4.1 (and the same behaviour doesn't seem to happen on EG 3.0) honours the original name and in order to make other code work I have had to issue a rename statement within the macro that contains the import procedure.

Kind regards

David
2 REPLIES 2
ChrisHemedinger
Community Manager
PROC IMPORT does make use of other SAS language facilities to do its work. So while you issued PROC IMPORT, it's possible that the procedure is using PROC SQL behind the scenes to do some of the work. For example, PROC IMPORT issues DATA step calls to import text files.

The difference in column name behavior (SEC/C vs SEC_C) is due to the OPTIONS VALIDVARNAME=ANY that EG submits. If you want your PROC IMPORT step to remap the column name to an acceptable traditional SAS name, put an OPTIONS VALIDVARNAME=V7; statement at the top of your program.

Chris
Become an Explorer! Join SAS Analytics Explorers to learn and complete challenges that earn rewards!
deleted_user
Not applicable
Thank you Chris

Kind regards

David

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore Now →
Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1479 views
  • 0 likes
  • 2 in conversation