Help using Base SAS procedures

Error while importing data

Reply
Frequent Contributor
Posts: 92

Error while importing data

Dear Team,

 

I think this should be an easy fix however i cant figure out a solution. Have tried searching on the forum as well and tried what was suggested however still cant get the desired resolution.

I am trying to add data stored in excel file in my systems D drive.

 

Please see the code along:

PROC IMPORT DATAFILE="/D:\Shivi\To & Fro Analysis\BookingCombined.xlsx"
      OUT=WORK.data
      DBMS=XLSX
      REPLACE;
RUN;

 

Evertime this error throws an error:

"ERROR: Physical file does not exist". Request you to please suggest what is the miss.

 

Regards, Shivi

Super User
Super User
Posts: 7,988

Re: Error while importing data

This path:

"/D:\Shivi\To & Fro Analysis\BookingCombined.xlsx"

 

Is invalid, may just be that there is an extra / at the beginning, try:

"D:\Shivi\To & Fro Analysis\BookingCombined.xlsx"

But make sure that D:\Shivi\To & Fro Analysis

Is a valid path, and is accessible to SAS, and that in that folder there is a file called: BookingCombined.xlsx

 

If your using University Edition, look on the specific UE forum, as there are many posts about it.

 

Also, try to avoid typing all in upper case.

Frequent Contributor
Posts: 92

Re: Error while importing data

Hi There,

 

I checked starting instructions with SAS university edition and they have categorically mentioned to use "/" at the begining hence i used the same.

 

Thanks, Shivi

Super User
Super User
Posts: 7,988

Re: Error while importing data

Ah, you see its useful to post the question in teh right forum them.  As you are using University Edition - which is different to the version most of us use, you will need to supply a correct URL to the path, so the D:\ part would be invalid.  You can find a lot of these posts by using the search box on the main page.  Here for example is a post which explains how to import a file into UE:

https://communities.sas.com/t5/SAS-Communities-Library/How-to-Import-an-Excel-File-to-SAS-University...

 

You will note that UE needs something like:

"/folders/myfolders/xyz.xlsx" 

and that your file be placed in the area accessible to UE - which doesn't use local network mappings like D:.

Super User
Posts: 19,862

Re: Error while importing data

1. Set up shared drive call myfolders. It needs to be called exactly that in lower case and set up on the VM. Read the installation instructions.
2. Move file to shared drive location
3. Access using unix path, because SAS is running on a unix VM, so /folders/myfolders/my-file.xlsx
Frequent Contributor
Posts: 92

Re: Error while importing data

Dear Reeza,

thanks for helping on this one.

 

While i was watching the step by step instructional video for university edition it also promoted me to follow the same process which you have outlined below.

Apologies if this sounds crazy but i have not worked on unix environment ever so what i understand is that do i need to get in touch with my IT team to have a virtual machine or VM ware installed on my machine & thereafter i can create the required folder structure.

 

Kindly advice.

Regards, Shivi

Super User
Super User
Posts: 7,988

Re: Error while importing data

Hi,

 

University Edition is already installed on a VM.  You ned to access the VM and put your file on a folder on that Virtual Machine.  Please see the link I posted and the help documentation provided by SAS:

http://support.sas.com/software/products/university-edition/faq/data_access_import.htm

http://support.sas.com/software/products/university-edition/faq/shared_folder_access_existing.htm

Frequent Contributor
Posts: 92

Re: Error while importing data

Hi RW9 & Reeza,

 

My sincere apologies and seems like i have done one of the dumbest things in my life. While what i was thinking was a SAS Studio it was SAS OnDemand application hence i was not able to upload data as you were describing.

 

This triggered me when i was not able to locate the SAS Studio folder on my desktop. All this confusion was because i had always been using SAS 9.2 and 9.3 versions or SAS EGuide or Miner and this seems like all together a different fascia.

 

Once again apologies and thanks for extending support.

 

Regards, Shivi

Ask a Question
Discussion stats
  • 7 replies
  • 362 views
  • 1 like
  • 3 in conversation