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

Hi I have this code, but I am getting an error in SAS studio. Please help. 

 

* import;
PROC IMPORT OUT= diag
	DATAFILE= 'C:\Users\manya\Documents\Flatiron\Patient_Diagnosis.csv' DBMS=csv REPLACE;
    GETNAMES=YES;
RUN;

PROC IMPORT OUT= tx
	DATAFILE= 'C:\Users\manya\Documents\Flatiron\Patient_Treatment.csv REPLACE;
    GETNAMES=YES;
RUN;

LOG

 statements in the SAS Studio environment may disable some output features.
 71         
 72         * import;
 73         PROC IMPORT OUT= diag
 74         DATAFILE= 'C:\Users\manya\Documents\Flatiron\Patient_Diagnosis.csv' DBMS=csv REPLACE;
 75             GETNAMES=YES;
 76         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, /pbr/biconfig/940/Lev1/SASApp/C:\Users\manya\Documents\Flatiron\Patient_Diagnosis.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.03 seconds
       user cpu time       0.03 seconds
       system cpu time     0.01 seconds
       memory              9282.40k
       OS Memory           36380.00k
       Timestamp           03/26/2020 07:54:49 PM
       Step Count                        24  Switch Count  5
       Page Faults                       0
       Page Reclaims                     3060
       Page Swaps                        0
       Voluntary Context Switches        44
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           64
       
 77         
 
 
 78         PROC IMPORT OUT= tx
 79         DATAFILE= '/home/users/jheo/Practice/Patient_Treatment.csv' DBMS=csv REPLACE;
 80             GETNAMES=YES;
 81         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, /home/users/jheo/Practice/Patient_Treatment.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.02 seconds
       user cpu time       0.02 seconds
       system cpu time     0.01 seconds
       memory              8301.50k
       OS Memory           36380.00k
       Timestamp           03/26/2020 07:54:49 PM
       Step Count                        25  Switch Count  5
       Page Faults                       0
       Page Reclaims                     939
       Page Swaps                        0
       Voluntary Context Switches        26
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           8
       
 82         
 83         
 84         %macro countid(tb);
 85         proc sql;
 86         select "&tb." as title, count(patient_id) as obs, count(distinct patient_id) as pts
 87         from &tb.;
 88         quit;
 89         %mend countid;
 90         %countid(diag);
1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

This error:

ERROR: Physical file does not exist, /pbr/biconfig/940/Lev1/SASApp/C:\Users\manya\Documents\Flatiron\Patient_Diagnosis.csv. 
 ERROR: Import unsuccessful.  See SAS Log for details.

tells me that most likely you are connecting to a server to run SAS / SAS Studio. As such the path of the files you can access start on the server somewhere and that server cannot access your local hard drive. The path of the file is starting where the SAS application resides on the server.


Solutions involve putting the file where the server can see it, which may mean moving the file to a work space you have on the server, or using a task that uses different access methods than the basic Proc Import code. You may need to discuss with your SAS admin what the approach preferred is in your organization.

View solution in original post

1 REPLY 1
ballardw
Super User

This error:

ERROR: Physical file does not exist, /pbr/biconfig/940/Lev1/SASApp/C:\Users\manya\Documents\Flatiron\Patient_Diagnosis.csv. 
 ERROR: Import unsuccessful.  See SAS Log for details.

tells me that most likely you are connecting to a server to run SAS / SAS Studio. As such the path of the files you can access start on the server somewhere and that server cannot access your local hard drive. The path of the file is starting where the SAS application resides on the server.


Solutions involve putting the file where the server can see it, which may mean moving the file to a work space you have on the server, or using a task that uses different access methods than the basic Proc Import code. You may need to discuss with your SAS admin what the approach preferred is in your organization.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 1 reply
  • 372 views
  • 0 likes
  • 2 in conversation