I am using SAS University Edition JupyterLab.
This is what I have
''' options compress=yes; Libname SAS_1 'C:\SASUniversityEdition\myfolders'; Proc import Datafile = "C:\SASUniversityEdition\myfolders\data_code\All_Contacts.xlsx" dbms = xlsx out = SAS_1.All_Contacts_code replace; getnames=Yes; run; '''
The log
ods listing close;ods html5 (id=saspy_internal) file=stdout options(bitmap_mode='inline') device=svg style=HTMLBlue; ods 114! graphics on / outputfmt=png; NOTE: Writing HTML5(SASPY_INTERNAL) Body file: STDOUT 115 116 options compress=yes; 117 Libname SAS_1 'C:\SASUniversityEdition\myfolders'; NOTE: Library SAS_1 does not exist. 118 119 Proc import 120 Datafile = "C:\SASUniversityEdition\myfolders\data_code\All_Contacts.xlsx" 121 dbms = xlsx 122 out = SAS_1.All_Contacts_code 123 replace; 124 getnames=Yes; 125 run; ERROR: Physical file does not exist, /media/sf_myfolders/C:\SASUniversityEdition\myfolders\data_code\/All_Contacts. NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE IMPORT used (Total process time): real time 0.00 seconds cpu time 0.00 seconds
I can follow the path to the physical file which is an Excel xlsx file.
What is the form of the Libname statement? Why does the path expressed in the datafile statement not find the excel file?
Thank you for your assistance.
wlierman
You need to address the shared folder from within the virtual machine, where the path is
/folders/myfolders
so the correct path would be
/folders/myfolders/data_code/All_Contacts.xlsx
You need to address the shared folder from within the virtual machine, where the path is
/folders/myfolders
so the correct path would be
/folders/myfolders/data_code/All_Contacts.xlsx
Thank you that was exactly the solution.
Besides the SAS University FAQs is there a article that you would recommend to help understand more about problems like this - connecting to data in a VM environment?
Thank you again for your help. I really appreciate it.
wlierman
That depends very much on the internal setup of the VM. If it surfaces a SSH port to, you can use SFTP clients to transfer data. The shared folder method is just what SAS chose vor UE.
Most servers today run in VMs.
Thank you.
wlierman
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.