Learning SAS? Welcome to the exclusive online community for all SAS learners.

Proc Import incompatibility

Reply
Occasional Contributor
Posts: 5

Proc Import incompatibility

The following runs on all the machines at my university. These are well maintained machines running paid licenses. SAS 9.4

running  under SAS 9.4 under Windows

10   PROC IMPORT DATAFILE=InBasil OUT=BasilDat DBMS=excel REPLACE;

11    SHEET="Basil"; RANGE="A3:J56";

12    GETNAMES=Yes;

13   run;

WARNING: SHEET name will be ignored if conflict occurs with RANGE name specified.

NOTE: WORK.BASILDAT data set was successfully created.

NOTE: The data set WORK.BASILDAT has 50 observations and 10 variables.

NOTE: PROCEDURE IMPORT used (Total process time):

      real time           10.10 seconds

      cpu time            0.20 seconds

When I use the same code in SAS Studio, I do not get the same result:

Within SAS Studio (updated today)

69 PROC IMPORT DATAFILE=InBasil OUT=BasilDat DBMS=xlsx REPLACE;

70 SHEET="Basil"; RANGE="A3:J56";

71 GETNAMES=Yes;

72 run;

NOTE: Variable Name Change.  Bucket N° -> Bucket_N__                     

NOTE: Variable Name Change.  Basil Plant -> Basil_Plant                    

NOTE: Variable Name Change.  Biomass (g) -> Biomass__g_                    

NOTE: The import data set has 52 observations and 10 variables.

NOTE: WORK.BASILDAT data set was successfully created.

NOTE: PROCEDURE IMPORT used (Total process time):

       real time           0.93 seconds

       cpu time            0.93 seconds

The xlsx file is found and read, but the Sheet and Range parameters are ignored.

Questions:

Is this a bug or is there some other reason for this self-incompatibility between the SAS 9.4 running under Linux on the Virtual Machine and SAS 9.4 running under Windows?

If it is not a bug, then where can I find a list of such incompatibilities?

SAS Super FREQ
Posts: 361

Re: Proc Import incompatibility

Hi, jhlieth! This is the product fact sheet for SAS University Edition:

http://www.sas.com/content/dam/SAS/en_us/doc/factsheet/sas-university-edition-107140.pdf

On the final couple of pages, there are some specifics about what it includes. I hope this will help sort out the differences between the full SAS Foundation product and UE. Please let me know if not.

Thanks!

Randy

Super User
Posts: 10,497

Re: Proc Import incompatibility

Note that there are differences between DBMS=Excel and DBMS=xlsx so you were not running the exact same code on both platforms. Also I think the DBMS=Excel is still experimental with behavior subject to change in later releases.

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