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
It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
deleted_user
Not applicable
Thank you Chris

Kind regards

David

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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