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

Good day.

I am having difficulty importing file into SAS Studio (full deployment)

Below is the code I used.

 

 

 

 73         PROC IMPORT OUT= WORK.am
 74                     DATAFILE= "G:\My Drive\rush_cleaning\2012\accident.dbf.csv"
 75                     DBMS=CSV REPLACE;
 76         RUN;

The error I get is as follows:

 

 

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, G:\My Drive\rush_cleaning\2012\accident.dbf.csv.
ERROR: Import unsuccessful. See SAS Log for details.
 
Kindly assist
1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

@oadeyemi wrote:

Thanks for replying.

You are right. I imported by clicking on the Import File.

Yes, I can see the codes.

However, I cannot see the dataset imported.

In SAS Studio, I should be able to see the imported table.

However, I cannot see that.

 

And when I use Proc Import using the code generated, there is an error.

I hope you understand my explanation.

 

I guess there might be a technical issue because I just installed SAS on the computer.

Thanks 

 


Rerun the task. Go the log. Copy the data step generated, if any, and the messages including the error. Paste the log result into a code box opened with the forum's {I} or "running man" icon. The code box is important because it preserves formatting and some of the errors will show diagnostics as to the location in the code the error occurs. The main message windows will reformat the text moving those diagnostics. Plus it is harder to tell what was actually in the log and what comments you may be typing in the middle.

 

I see a number of concerns. Since you are referencing a file named "G:\My Drive\rush_cleaning\2012\accident.dbf.csv" it appears as if the file originated as a DBF file, and possibly was converted to CSV. Depending on the process used you may not actually have a CSV file or the conversion "corrupted' the file.

 

I am also a bit cautious when I see something like :

I  found the "import" tab and I selected the excel file from the folders.

 

Most of the time when I use the wizards "CSV" files are not Listed as Excel but as "Comma Separated Values". So if you use an "Excel" format to import an actual CSV then likely there is a type mismatch, which is why we need to see the actual log of the code.

 

And if you did start with a DBF file you might be able to import that directly without conversion to CSV. Use the import Wizard and look for the "dBase File" entry.

 

If you do use proc import on a CSV, or other delimited, file I strongly recommend always setting the guessingrows option to MAX or the number of lines in the file so more records are examined before SAS assigns variable characteristics like type, length, informat and format.

 

View solution in original post

10 REPLIES 10
Reeza
Super User
You can probably ignore the parameter issue but you need to find the correct path. Fortunately in SAS Studio this is relatively easy. Go to the Servers Files and Folders pane. Find the file you want to import, right click it and copy the path.

If you cannot find the file you likely are running SAS on a server and will have to upload your file and then import it. You can upload your file in the Servers Files and Folders pane to a folder that you have permissions to write to and then follow the previous steps to import it.
oadeyemi
Obsidian | Level 7

Thank you for the help.

I  found the "import" tab and I selected the excel file from the folders.

There was no error but I cannot see the sheet I imported.

How can I view this sheet?

Reeza
Super User
I'm not actually sure what that means....
Are you using the GUI or coding?
Assuming you imported the file correctly you should be able to go to the libraries section and should see your data set in the Work library.

However, I think it also pops up when you import data successfully automatically.
oadeyemi
Obsidian | Level 7

Thank you for your input.

I am not using GUI or coding.

I am using SAS Studio from a SAS package that has all the gamut of SAS tools (9.4, Enterprise, Studio etc.)

It is installed on my hard drive.

 

Yes I imported using the "point and click" and the proc import codes.

No information in the library.

 

I guess it is a technical issue.

Thanks

Reeza
Super User
GUI = Graphical User Interface = Point and Click.
SuryaKiran
Meteorite | Level 14

Hello,

 

If you have used the Import data task, then you can see the code generated by SAS. Your actual physical path can be found there for future reference. 

 

Thanks,
Suryakiran
oadeyemi
Obsidian | Level 7

Thanks for replying.

You are right. I imported by clicking on the Import File.

Yes, I can see the codes.

However, I cannot see the dataset imported.

In SAS Studio, I should be able to see the imported table.

However, I cannot see that.

 

And when I use Proc Import using the code generated, there is an error.

I hope you understand my explanation.

 

I guess there might be a technical issue because I just installed SAS on the computer.

Thanks 

 

Reeza
Super User

And when I use Proc Import using the code generated, there is an error.

I hope you understand my explanation.

Post the error then. You will not see a table/output if the process errors out because no output is often created. 

 

ballardw
Super User

@oadeyemi wrote:

Thanks for replying.

You are right. I imported by clicking on the Import File.

Yes, I can see the codes.

However, I cannot see the dataset imported.

In SAS Studio, I should be able to see the imported table.

However, I cannot see that.

 

And when I use Proc Import using the code generated, there is an error.

I hope you understand my explanation.

 

I guess there might be a technical issue because I just installed SAS on the computer.

Thanks 

 


Rerun the task. Go the log. Copy the data step generated, if any, and the messages including the error. Paste the log result into a code box opened with the forum's {I} or "running man" icon. The code box is important because it preserves formatting and some of the errors will show diagnostics as to the location in the code the error occurs. The main message windows will reformat the text moving those diagnostics. Plus it is harder to tell what was actually in the log and what comments you may be typing in the middle.

 

I see a number of concerns. Since you are referencing a file named "G:\My Drive\rush_cleaning\2012\accident.dbf.csv" it appears as if the file originated as a DBF file, and possibly was converted to CSV. Depending on the process used you may not actually have a CSV file or the conversion "corrupted' the file.

 

I am also a bit cautious when I see something like :

I  found the "import" tab and I selected the excel file from the folders.

 

Most of the time when I use the wizards "CSV" files are not Listed as Excel but as "Comma Separated Values". So if you use an "Excel" format to import an actual CSV then likely there is a type mismatch, which is why we need to see the actual log of the code.

 

And if you did start with a DBF file you might be able to import that directly without conversion to CSV. Use the import Wizard and look for the "dBase File" entry.

 

If you do use proc import on a CSV, or other delimited, file I strongly recommend always setting the guessingrows option to MAX or the number of lines in the file so more records are examined before SAS assigns variable characteristics like type, length, informat and format.

 

oadeyemi
Obsidian | Level 7

Thank you so much.

The extension of the document was the problem.

I kept assuming it was a CSV but it was saved as an excel document (converted from dbf to excel)

Thank you for the steps you suggested.

It is resolved. 

Thank you

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 10 replies
  • 1643 views
  • 0 likes
  • 4 in conversation