I keep getting errors while attempting to import datasets and/or datasheets.
I verified the filename. I even moved the file to my C drive to see if would make a difference.
I can upload it to the console but I cannot get any program to run the datasheet.
I even used different versions of PROC IMPORT code.
I am using SAS® University Edition
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
42 ;
43 PROC IMPORT OUT= WORK.Forest
44 DATAFILE= "F:\Bloomburgh university\Coursework\Biostat\Lab 1\lab1.2\lab1.2.csv"
45 DBMS=CSV REPLACE;
46 GETNAMES=YES;
47 DATAROW=2;
48 RUN;
NOTE: Unable to open parameter catalog: SASUSER.PARMS.PARMS.SLIST in update mode. Temporary parameter values will be saved to
WORK.PARMS.PARMS.SLIST.
ERROR: Physical file does not exist, /opt/sasinside/SASConfig/Lev1/SASApp/F:\Bloomburgh university\Coursework\Biostat\Lab
1\lab1.2\lab1.2.csv.
ERROR: Import unsuccessful. See SAS Log for details.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.34 seconds
cpu time 0.35 seconds
49 ;
50 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
60 ;
Is there an easier way to import files?
It is mainly talking about making a libname but the idea is the same.
Or look at this one with some nice screen shots. and links to the documentation.
SAS is running under Unix and in that unix systems you can only access the files in the /folders/myfolders/ directory path.
You cannot reference F: or other DOS/Windows style ways of referencing file. All that does is make Unix think you want a file in the current directory whose name starts with upper case F and a colon.
You need to place the file within the disk space of the Virtual Unix Machine that is running SAS. You need then reference using Unix file naming conventions. You cannot reference it as you would from programs running under Windows.
Read the instructions from SAS University Edition or search for the dozen or so other posting on this forum of the same problem.
I do not know how place the file within the disk space of the Virtual Unix Machine.
I have read the instructions and I have reviewed a number of posts and forums voicing the same issues.
I have been using those resources and been making the attempt to import the file for over four hours.
It is mainly talking about making a libname but the idea is the same.
Or look at this one with some nice screen shots. and links to the documentation.
SAS is running under Unix and in that unix systems you can only access the files in the /folders/myfolders/ directory path.
You cannot reference F: or other DOS/Windows style ways of referencing file. All that does is make Unix think you want a file in the current directory whose name starts with upper case F and a colon.
Thank you.
I was able to fix my issue using the path shown under properties for My Folder in SAS Studio:
/folders/myfolders/XYZ
Here, XYZ is user specific file path.
example:
/folders/myfolders/ex1/file1
Good luck!!
@jthakur .. Thanks.. Your advice solved my issue..
where are the screenshots and link??
For the SAS university edition virtual application , it thinks you are on a unix machine .
-> create 'myfolders' as per the install document.
-> got to Server files and folders . under your folder there will be a ser folder .. something like 'sasuser.v94'
-> right click on 'sasuser.v94' and select upload files .
-> upload all the files , and you will see the files under the user folder.
you can useinfile stement like this in your code
=> infile "/folders/myfolders/sasuser.v94/mydata.txt";
Rohith,
Thank you for posting this additional information. I am using the shared folders option, but SAS University Edition was unable to find my CSV file under myfolders. When I uploaded them directly to the sasuser.v94 folder in the web browser, the data imported correctly.
Do you know what the utility of the shared folders is if you cannot call files directly from here in the code?
Best,
Josh
@Josh_SAS to be blunt you probably did something wrong. One way to verify this is to place file in myfolders, then use the Server Files and Folders pane to navigate to the file. Right click the file and select properties. The path here is what you need in your code. Most likely it was a case issue.
@MN2 Your probably using SAS Academics On Demand rather than SAS UE installed on your desktop. Or possibly SAS UE via AWS though I wasn't aware of any file restrictions on it.
You can consider using SAS UE instead if necessary.
I have been getting the error and I am not able to import any file . I Have used the filepath as copied from properties . I want to upload a csv file
/** FOR CSV Files uploaded from Windows **/
FILENAME CSV "/folders/myshortcuts/myfolder/h1b_kaggle.csv" TERMSTR=CRLF;
/** Import the CSV file. **/
PROC IMPORT DATAFILE=CSV
OUT=WORK.MYCSV
DBMS=CSV
REPLACE;
RUN;
/** Print the results. **/
PROC PRINT DATA=WORK.MYCSV; RUN;
/** Unassign the file reference. **/
FILENAME CSV;
The error in the log is
Are you sure you need the termstr option? What happens if you don't use it?
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.