Help using Base SAS procedures

proc import behave different in SAS Base and SAS Enterprise Guide

Reply
New Contributor
Posts: 4

proc import behave different in SAS Base and SAS Enterprise Guide

At least the columns names created by "proc import" are different depending on the codes are running in SAS Base or SAS Enterprise Guide.

 

As a result of column name differences, the codes created in SAS Enterprise Guide cannot run sucessfully in SAS Base.

 

How to make SAS Enterprise Guide to generate the same codes as SAS Base for "proc import"?

 

Thank you!

Super User
Posts: 17,868

Re: proc import behave different in SAS Base and SAS Enterprise Guide

Depends what you mean. It's possible you could be running two different versions of SAS, but most likely you need to set the following option:

 

option validvarname=v7;

EG is set to ANY by default, which allows more variation in naming, but I find it just confuses things. 

Try this and see if that helps. If not, post back with more details and an example of how they're different.

Super User
Posts: 10,516

Re: proc import behave different in SAS Base and SAS Enterprise Guide

For a similar issue please read through this thread: https://communities.sas.com/t5/Base-SAS-Programming/Importing-Excel-into-SAS/m-p/363447

 

I know that you did not say that your data is Excel. Excel and other spreadsheets are just one layer of the underlying issue:

Proc IMPORT Guesses and the guesses may change from file to file based on the content. Any process that relies heavily on Proc Import will eventually fail.

Ask a Question
Discussion stats
  • 2 replies
  • 91 views
  • 2 likes
  • 3 in conversation