Hi,
I'm new to Base SAS. I'm leaning to use base SAS to import a csv datafile( stage_1_feedback_monthly_raw_data_v2.csv) located on a server. I am using use SAS EG 7.12. Here's my code:
PROC IMPORT DATAFILE="\\blackett\ncareers\MI\feedback\SAS_dataset\stage_1_feedback_monthly_raw_data_v2.csv" DBMS=csv
OUT=work.stage_1_feedback_import REPLACE;
run;
The log( see below) mentions that the file does not exist suggesting my filepath is wrong. I can't see what path to use? Can anyone help? Many thanks in advance :).
24 PROC IMPORT DATAFILE="\\blackett\ncareers\MI\feedback\SAS_dataset\stage_1_feedback_monthly_raw_data_v2.csv" DBMS=csv 25 OUT=work.stage_1_feedback_import REPLACE; 26 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/sas/config/Lev1/SASApp/\\blackett\ncareers\MI\feedback\SAS_dataset\stage_1_feedback_monthly_raw_data_v2.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 5.06 seconds cpu time 0.04 seconds 27 28 GOPTIONS NOACCESSIBLE; 29 %LET _CLIENTTASKLABEL=; 30 %LET _CLIENTPROCESSFLOWNAME=;
Your CSV file is on your local Windows network, but your SAS code is running in Linux (looks like). So you can either:
- address your CSV file path in terms of Linux (maybe you have a shared file mount that you can use), or
- use the Copy Files task to copy the CSV file to the Linux file system, then PROC IMPORT from there.
Copy Files is built into SAS Enterprise Guide, but in version 7.13 and later. If you have 7.12 you'll have to install that task yourself.
Hi Chris,
Thanks for responding so quickly. I will enquire with my IT department if they can implement any of those solutions you've recommended.
kind regards,
Eu Aun
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: