BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

Read this one for example  .

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.

View solution in original post

16 REPLIES 16
Tom
Super User Tom
Super User

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.

Opheliaoftheeventhorizon
Fluorite | Level 6

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.

Tom
Super User Tom
Super User

Read this one for example  .

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.

jthakur
Calcite | Level 5

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!!

 

winx87
Calcite | Level 5

@jthakur .. Thanks.. Your advice solved my issue..

imdivanshu
Calcite | Level 5

where are the screenshots and link??

Rohith123
Fluorite | Level 6

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";

Josh_SAS
Calcite | Level 5

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

Reeza
Super User

@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
Calcite | Level 5 MN2
Calcite | Level 5
This is helpful but I am attempting to load a very large dataset, 1.5GB and it says the limit is 10MB. Any advice? Thanks.
Reeza
Super User

@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. 

vjjags
Calcite | Level 5

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 

 

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 FILENAME CSV "/folders/myshortcuts/myfolder/h1b_kaggle.csv" TERMSTR=CRLF;
74
75
76 /** Import the CSV file. **/
77
78 PROC IMPORT DATAFILE=CSV
79 OUT=WORK.MYCSV
80 DBMS=CSV
81 REPLACE;
82 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.
Unable to sample external file, no data in first 5 records.
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 7:09.55
cpu time 7:08.86
 
83
84
85 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 

 

 

 

 

 

Reeza
Super User

Are you sure you need the termstr option? What happens if you don't use it?

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 16 replies
  • 48622 views
  • 16 likes
  • 10 in conversation