Desktop productivity for business analysts and programmers

Unexpected import from Access to EG 4.1

Reply
N/A
Posts: 0

Unexpected import from Access to EG 4.1

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
Community Manager
Posts: 2,696

Re: Unexpected import from Access to EG 4.1

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
N/A
Posts: 0

Re: Unexpected import from Access to EG 4.1

Thank you Chris

Kind regards

David
Ask a Question
Discussion stats
  • 2 replies
  • 82 views
  • 0 likes
  • 2 in conversation