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

ODS LISTING;
libname session1 "C:\Users\laura\OneDrive\Documents\econ485";

PROC IMPORT OUT= WORK.one
DATAFILE="C:\Users\laura\OneDrive\Documents\econ485\project1data.csv"
DBMS=csv REPLACE;
RUN;

proc print data=one;
run;

 

I ran this before and it was successful now when I try to do new things I'm getting this error message: ERROR: File WORK.ONE.DATA does not exist.

 

I think this is my full log: 

DATAFILE= "C:\Users\laura\OneDrive\Documents\econ485\project1data.csv";
48 DBMS=csv REPLACE;
49 RUN;


50 PROC IMPORT OUT= WORK.one;
ERROR: FILE= or TABLE= is required and must be specified.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

51 DATAFILE="C:\Users\laura\OneDrive\Documents\econ485\project1data.csv";
52 DBMS=csv REPLACE;
53 RUN;


54 PROC IMPORT OUT= WORK.one
55 DATAFILE="C:\Users\laura\OneDrive\Documents\econ485\project1data.csv"
56 DBMS=csv REPLACE;
57 RUN;

ERROR: File is in use, C:\Users\laura\OneDrive\Documents\econ485\project1data.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.10 seconds
cpu time 0.03 seconds

 

58 PROC IMPORT OUT= WORK.one
59 DATAFILE="C:\Users\laura\OneDrive\Documents\econ485\project1data.csv"
60 DBMS=csv REPLACE;
61 RUN;

62 /**********************************************************************
63 * PRODUCT: SAS
64 * VERSION: 9.4
65 * CREATOR: External File Interface
66 * DATE: 22FEB19
67 * DESC: Generated SAS Datastep Code
68 * TEMPLATE SOURCE: (None Specified.)
69 ***********************************************************************/
70 data WORK.ONE ;
71 %let _EFIERR_ = 0; /* set the ERROR detection macro variable */
72 infile 'C:\Users\laura\OneDrive\Documents\econ485\project1data.csv' delimiter = ',' MISSOVER DSD lrecl=32767
72 ! firstobs=2 ;
73 informat observation_date yymmdd10. ;
74 informat Population best32. ;
75 informat Income best32. ;
76 informat One_year best32. ;
77 informat Ten_year best32. ;
78 informat Unemployment best32. ;
79 informat PCE best32. ;
80 informat PCE_lag best32. ;
81 informat Consumption best32. ;
82 informat Price best32. ;
83 format observation_date yymmdd10. ;
84 format Population best12. ;
85 format Income best12. ;
86 format One_year best12. ;
87 format Ten_year best12. ;
88 format Unemployment best12. ;
89 format PCE best12. ;
90 format PCE_lag best12. ;
91 format Consumption best12. ;
92 format Price best12. ;
93 input
94 observation_date
95 Population
96 Income
97 One_year
98 Ten_year
99 Unemployment
100 PCE
101 PCE_lag
102 Consumption
103 Price
104 ;
105 if _ERROR_ then call symputx('_EFIERR_',1); /* set ERROR detection macro variable */
106 run;

NOTE: The infile 'C:\Users\laura\OneDrive\Documents\econ485\project1data.csv' is:
Filename=C:\Users\laura\OneDrive\Documents\econ485\project1data.csv,
RECFM=V,LRECL=32767,File Size (bytes)=32584,
Last Modified=14:11:00 22 ôáøåàø 2019,
Create Time=14:11:00 22 ôáøåàø 2019

NOTE: 527 records were read from the infile 'C:\Users\laura\OneDrive\Documents\econ485\project1data.csv'.
The minimum record length was 57.
The maximum record length was 62.
NOTE: The data set WORK.ONE has 527 observations and 10 variables.
NOTE: DATA statement used (Total process time):
real time 1.58 seconds
cpu time 0.20 seconds


527 rows created in WORK.ONE from C:\Users\laura\OneDrive\Documents\econ485\project1data.csv.

 

NOTE: WORK.ONE data set was successfully created.
NOTE: The data set WORK.ONE has 527 observations and 10 variables.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 3.86 seconds
cpu time 0.42 seconds

 

107 proc print data=one;
NOTE: Writing HTML Body file: sashtml.htm
108 run;

NOTE: There were 527 observations read from the data set WORK.ONE.
NOTE: PROCEDURE PRINT used (Total process time):
real time 3.79 seconds
cpu time 0.87 seconds


109 ODS LISTING;
110 libname session1 "C:\Users\laura\OneDrive\Documents\econ485";
NOTE: Libref SESSION1 was successfully assigned as follows:
Engine: V9
Physical Name: C:\Users\laura\OneDrive\Documents\econ485
111
112 PROC IMPORT OUT= WORK.one
113 DATAFILE="C:\Users\laura\OneDrive\Documents\econ485\project1data.csv"
114 DBMS=csv REPLACE;
115 RUN;

ERROR: File is in use, C:\Users\laura\OneDrive\Documents\econ485\project1data.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.12 seconds
cpu time 0.09 seconds

116


117 proc print data=one;
ERROR: File WORK.ONE.DATA does not exist.
118 run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.02 seconds
cpu time 0.00 seconds

119


120 proc contents DATA=WORK.one;
ERROR: File WORK.ONE.DATA does not exist.
121 run;

NOTE: Statements not processed because of errors noted above.
NOTE: PROCEDURE CONTENTS used (Total process time):
real time 0.04 seconds
cpu time 0.00 seconds

NOTE: The SAS System stopped processing this step because of errors.

122 proc contents DATA=one;
ERROR: File WORK.ONE.DATA does not exist.
123 run;

NOTE: Statements not processed because of errors noted above.
NOTE: PROCEDURE CONTENTS used (Total process time):
real time 0.09 seconds
cpu time 0.01 seconds

NOTE: The SAS System stopped processing this step because of errors.

124 proc contents data=WORK.one;
ERROR: File WORK.ONE.DATA does not exist.
125 run;

NOTE: Statements not processed because of errors noted above.
NOTE: PROCEDURE CONTENTS used (Total process time):
real time 0.04 seconds
cpu time 0.01 seconds

NOTE: The SAS System stopped processing this step because of errors.

126 proc contents data=project1;
ERROR: File WORK.PROJECT1.DATA does not exist.
127 run;

NOTE: Statements not processed because of errors noted above.
NOTE: PROCEDURE CONTENTS used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds

NOTE: The SAS System stopped processing this step because of errors.

128 PCE0 = PCE/6.029166667;
----
180

ERROR 180-322: Statement is not valid or it is used out of proper order.

129 RPCE = Price/PCE0;
----
180

ERROR 180-322: Statement is not valid or it is used out of proper order.

130 run;

131 PCE0 = PCE/6.029166667;
----
180

ERROR 180-322: Statement is not valid or it is used out of proper order.

132 RPCE = Price/PCE0;
----
180

ERROR 180-322: Statement is not valid or it is used out of proper order.

133 run;

134
135 proc contents;
ERROR: File WORK.ONE.DATA does not exist.
136 run;

NOTE: Statements not processed because of errors noted above.
NOTE: PROCEDURE CONTENTS used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds

NOTE: The SAS System stopped processing this step because of errors.

137 data two;
138 set one;
ERROR: File WORK.ONE.DATA does not exist.
139
140 PCE0 = pce/6.029166667;
141 RGAS_PCE0 = Price/PCE0;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.TWO may be incomplete. When this step was stopped there were 0 observations and 4 variables.
NOTE: DATA statement used (Total process time):
real time 39.68 seconds
cpu time 2.26 seconds

 

142 proc print data=work.one;
ERROR: File WORK.ONE.DATA does not exist.
143 run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds


144 ODS LISTING;
145 libname session1 "C:\Users\laura\OneDrive\Documents\econ485";
NOTE: Libref SESSION1 was successfully assigned as follows:
Engine: V9
Physical Name: C:\Users\laura\OneDrive\Documents\econ485
146
147 PROC IMPORT OUT= WORK.one
148 DATAFILE="C:\Users\laura\OneDrive\Documents\econ485\project1data.csv"
149 DBMS=csv REPLACE;
150 RUN;

ERROR: File is in use, C:\Users\laura\OneDrive\Documents\econ485\project1data.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.09 seconds
cpu time 0.09 seconds

151


152 proc print data=one;
ERROR: File WORK.ONE.DATA does not exist.
153 run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds


154 ODS LISTING;
155 libname session1 "C:\Users\laura\OneDrive\Documents\econ485";
NOTE: Libref SESSION1 was successfully assigned as follows:
Engine: V9
Physical Name: C:\Users\laura\OneDrive\Documents\econ485
156
157 PROC IMPORT OUT= WORK.one
158 DATAFILE="C:\Users\laura\OneDrive\Documents\econ485\project1data.csv"
159 DBMS=csv REPLACE;
160 RUN;

ERROR: File is in use, C:\Users\laura\OneDrive\Documents\econ485\project1data.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.07 seconds
cpu time 0.06 seconds

161


162 proc print data=one;
ERROR: File WORK.ONE.DATA does not exist.
163 run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds


164 ODS LISTING;
165 libname session1 "C:\Users\laura\OneDrive\Documents\econ485";
NOTE: Libref SESSION1 was successfully assigned as follows:
Engine: V9
Physical Name: C:\Users\laura\OneDrive\Documents\econ485
166
167 PROC IMPORT OUT= WORK.one
168 DATAFILE="C:\Users\laura\OneDrive\Documents\econ485\project1data.csv"
169 DBMS=csv REPLACE;
170 RUN;

ERROR: File is in use, C:\Users\laura\OneDrive\Documents\econ485\project1data.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.07 seconds
cpu time 0.06 seconds

171


172 proc print data=one;
ERROR: File WORK.ONE.DATA does not exist.
173 run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

1. Restart your computer - if an application crashed it may have left a lock on the file that you need to 'unlock'. 

2. Verify your CSV is correct and in the location expected

3. Try the code below. If it does not work, please post the log from the code alone:

 

PROC IMPORT OUT= Project1
DATAFILE="C:\Users\laura\OneDrive\Documents\econ485\project1data.csv"
DBMS=csv 
REPLACE;
RUN;

This also looks like it's trying to read from a cloud drive (OneDrive), so you may need an internet connection or it's possible all the read attempts have flagged some issues via OneDrive so there could be a security issue. I think this is unlikely, but it's a possibility. I've also seen cases where OneDrive changes the name slightly, so be very careful when checking the file name. 

 


View solution in original post

13 REPLIES 13
Reeza
Super User

Starting a new question isn't helpful, the answers will be the same. Post the log.

 


@khalillx wrote:

ODS LISTING;
libname session1 "C:\Users\laura\OneDrive\Documents\econ485";

PROC IMPORT OUT= WORK.one
DATAFILE="C:\Users\laura\OneDrive\Documents\econ485\project1data.csv"
DBMS=csv REPLACE;
RUN;

proc print data=one;
run;

 

I ran this before and it was successful now when I try to do new things I'm getting this error message: ERROR: File WORK.ONE.DATA does not exist.

 

What is going on? I can't do anything else for my assignment now and I have no idea what to do. Please help.


 

khalillx
Fluorite | Level 6

This is a different question about an error I just got a second ago. What are you talking about?

Reeza
Super User
Ok, same answer anyways, please post your full log.
khalillx
Fluorite | Level 6
Like this?
DATAFILE= "C:\Users\laura\OneDrive\Documents\econ485\project1data.csv";
48 DBMS=csv REPLACE;
49 RUN;


50 PROC IMPORT OUT= WORK.one;
ERROR: FILE= or TABLE= is required and must be specified.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

51 DATAFILE="C:\Users\laura\OneDrive\Documents\econ485\project1data.csv";
52 DBMS=csv REPLACE;
53 RUN;


54 PROC IMPORT OUT= WORK.one
55 DATAFILE="C:\Users\laura\OneDrive\Documents\econ485\project1data.csv"
56 DBMS=csv REPLACE;
57 RUN;

ERROR: File is in use, C:\Users\laura\OneDrive\Documents\econ485\project1data.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.10 seconds
cpu time 0.03 seconds



58 PROC IMPORT OUT= WORK.one
59 DATAFILE="C:\Users\laura\OneDrive\Documents\econ485\project1data.csv"
60 DBMS=csv REPLACE;
61 RUN;

62 /**********************************************************************
63 * PRODUCT: SAS
64 * VERSION: 9.4
65 * CREATOR: External File Interface
66 * DATE: 22FEB19
67 * DESC: Generated SAS Datastep Code
68 * TEMPLATE SOURCE: (None Specified.)
69 ***********************************************************************/
70 data WORK.ONE ;
71 %let _EFIERR_ = 0; /* set the ERROR detection macro variable */
72 infile 'C:\Users\laura\OneDrive\Documents\econ485\project1data.csv' delimiter = ',' MISSOVER DSD lrecl=32767
72 ! firstobs=2 ;
73 informat observation_date yymmdd10. ;
74 informat Population best32. ;
75 informat Income best32. ;
76 informat One_year best32. ;
77 informat Ten_year best32. ;
78 informat Unemployment best32. ;
79 informat PCE best32. ;
80 informat PCE_lag best32. ;
81 informat Consumption best32. ;
82 informat Price best32. ;
83 format observation_date yymmdd10. ;
84 format Population best12. ;
85 format Income best12. ;
86 format One_year best12. ;
87 format Ten_year best12. ;
88 format Unemployment best12. ;
89 format PCE best12. ;
90 format PCE_lag best12. ;
91 format Consumption best12. ;
92 format Price best12. ;
93 input
94 observation_date
95 Population
96 Income
97 One_year
98 Ten_year
99 Unemployment
100 PCE
101 PCE_lag
102 Consumption
103 Price
104 ;
105 if _ERROR_ then call symputx('_EFIERR_',1); /* set ERROR detection macro variable */
106 run;

NOTE: The infile 'C:\Users\laura\OneDrive\Documents\econ485\project1data.csv' is:
Filename=C:\Users\laura\OneDrive\Documents\econ485\project1data.csv,
RECFM=V,LRECL=32767,File Size (bytes)=32584,
Last Modified=14:11:00 22 ôáøåàø 2019,
Create Time=14:11:00 22 ôáøåàø 2019

NOTE: 527 records were read from the infile 'C:\Users\laura\OneDrive\Documents\econ485\project1data.csv'.
The minimum record length was 57.
The maximum record length was 62.
NOTE: The data set WORK.ONE has 527 observations and 10 variables.
NOTE: DATA statement used (Total process time):
real time 1.58 seconds
cpu time 0.20 seconds


527 rows created in WORK.ONE from C:\Users\laura\OneDrive\Documents\econ485\project1data.csv.



NOTE: WORK.ONE data set was successfully created.
NOTE: The data set WORK.ONE has 527 observations and 10 variables.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 3.86 seconds
cpu time 0.42 seconds



107 proc print data=one;
NOTE: Writing HTML Body file: sashtml.htm
108 run;

NOTE: There were 527 observations read from the data set WORK.ONE.
NOTE: PROCEDURE PRINT used (Total process time):
real time 3.79 seconds
cpu time 0.87 seconds


109 ODS LISTING;
110 libname session1 "C:\Users\laura\OneDrive\Documents\econ485";
NOTE: Libref SESSION1 was successfully assigned as follows:
Engine: V9
Physical Name: C:\Users\laura\OneDrive\Documents\econ485
111
112 PROC IMPORT OUT= WORK.one
113 DATAFILE="C:\Users\laura\OneDrive\Documents\econ485\project1data.csv"
114 DBMS=csv REPLACE;
115 RUN;

ERROR: File is in use, C:\Users\laura\OneDrive\Documents\econ485\project1data.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.12 seconds
cpu time 0.09 seconds

116


117 proc print data=one;
ERROR: File WORK.ONE.DATA does not exist.
118 run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.02 seconds
cpu time 0.00 seconds

119


120 proc contents DATA=WORK.one;
ERROR: File WORK.ONE.DATA does not exist.
121 run;

NOTE: Statements not processed because of errors noted above.
NOTE: PROCEDURE CONTENTS used (Total process time):
real time 0.04 seconds
cpu time 0.00 seconds

NOTE: The SAS System stopped processing this step because of errors.

122 proc contents DATA=one;
ERROR: File WORK.ONE.DATA does not exist.
123 run;

NOTE: Statements not processed because of errors noted above.
NOTE: PROCEDURE CONTENTS used (Total process time):
real time 0.09 seconds
cpu time 0.01 seconds

NOTE: The SAS System stopped processing this step because of errors.

124 proc contents data=WORK.one;
ERROR: File WORK.ONE.DATA does not exist.
125 run;

NOTE: Statements not processed because of errors noted above.
NOTE: PROCEDURE CONTENTS used (Total process time):
real time 0.04 seconds
cpu time 0.01 seconds

NOTE: The SAS System stopped processing this step because of errors.

126 proc contents data=project1;
ERROR: File WORK.PROJECT1.DATA does not exist.
127 run;

NOTE: Statements not processed because of errors noted above.
NOTE: PROCEDURE CONTENTS used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds

NOTE: The SAS System stopped processing this step because of errors.

128 PCE0 = PCE/6.029166667;
----
180

ERROR 180-322: Statement is not valid or it is used out of proper order.

129 RPCE = Price/PCE0;
----
180

ERROR 180-322: Statement is not valid or it is used out of proper order.

130 run;

131 PCE0 = PCE/6.029166667;
----
180

ERROR 180-322: Statement is not valid or it is used out of proper order.

132 RPCE = Price/PCE0;
----
180

ERROR 180-322: Statement is not valid or it is used out of proper order.

133 run;

134
135 proc contents;
ERROR: File WORK.ONE.DATA does not exist.
136 run;

NOTE: Statements not processed because of errors noted above.
NOTE: PROCEDURE CONTENTS used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds

NOTE: The SAS System stopped processing this step because of errors.

137 data two;
138 set one;
ERROR: File WORK.ONE.DATA does not exist.
139
140 PCE0 = pce/6.029166667;
141 RGAS_PCE0 = Price/PCE0;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.TWO may be incomplete. When this step was stopped there were 0 observations and 4 variables.
NOTE: DATA statement used (Total process time):
real time 39.68 seconds
cpu time 2.26 seconds



142 proc print data=work.one;
ERROR: File WORK.ONE.DATA does not exist.
143 run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds


144 ODS LISTING;
145 libname session1 "C:\Users\laura\OneDrive\Documents\econ485";
NOTE: Libref SESSION1 was successfully assigned as follows:
Engine: V9
Physical Name: C:\Users\laura\OneDrive\Documents\econ485
146
147 PROC IMPORT OUT= WORK.one
148 DATAFILE="C:\Users\laura\OneDrive\Documents\econ485\project1data.csv"
149 DBMS=csv REPLACE;
150 RUN;

ERROR: File is in use, C:\Users\laura\OneDrive\Documents\econ485\project1data.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.09 seconds
cpu time 0.09 seconds

151


152 proc print data=one;
ERROR: File WORK.ONE.DATA does not exist.
153 run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds


154 ODS LISTING;
155 libname session1 "C:\Users\laura\OneDrive\Documents\econ485";
NOTE: Libref SESSION1 was successfully assigned as follows:
Engine: V9
Physical Name: C:\Users\laura\OneDrive\Documents\econ485
156
157 PROC IMPORT OUT= WORK.one
158 DATAFILE="C:\Users\laura\OneDrive\Documents\econ485\project1data.csv"
159 DBMS=csv REPLACE;
160 RUN;

ERROR: File is in use, C:\Users\laura\OneDrive\Documents\econ485\project1data.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.07 seconds
cpu time 0.06 seconds

161


162 proc print data=one;
ERROR: File WORK.ONE.DATA does not exist.
163 run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds


164 ODS LISTING;
165 libname session1 "C:\Users\laura\OneDrive\Documents\econ485";
NOTE: Libref SESSION1 was successfully assigned as follows:
Engine: V9
Physical Name: C:\Users\laura\OneDrive\Documents\econ485
166
167 PROC IMPORT OUT= WORK.one
168 DATAFILE="C:\Users\laura\OneDrive\Documents\econ485\project1data.csv"
169 DBMS=csv REPLACE;
170 RUN;

ERROR: File is in use, C:\Users\laura\OneDrive\Documents\econ485\project1data.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.07 seconds
cpu time 0.06 seconds

171


172 proc print data=one;
ERROR: File WORK.ONE.DATA does not exist.
173 run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds


Reeza
Super User
No. I don't need your full log history. I need just the log from the exact code you posted. But the error is there several times which is clear - the FIle is in use. You likely have it open in Excel or another application so SAS can't access it.

And once you fix this, your proc contents will work too, ergo why this is the same as your other question.
khalillx
Fluorite | Level 6
That's not it. I already tried that. The file is no longer in use anywhere and I still get the same error message.
SASKiwi
PROC Star

Your log indicates you haven't fixed removing the semicolon as already suggested:

 

DATAFILE= "C:\Users\laura\OneDrive\Documents\econ485\project1data.csv"; <== *** remove this ***
48 DBMS=csv REPLACE;
49 RUN;
khalillx
Fluorite | Level 6
I removed it awhile ago.
Reeza
Super User

1. Restart your computer - if an application crashed it may have left a lock on the file that you need to 'unlock'. 

2. Verify your CSV is correct and in the location expected

3. Try the code below. If it does not work, please post the log from the code alone:

 

PROC IMPORT OUT= Project1
DATAFILE="C:\Users\laura\OneDrive\Documents\econ485\project1data.csv"
DBMS=csv 
REPLACE;
RUN;

This also looks like it's trying to read from a cloud drive (OneDrive), so you may need an internet connection or it's possible all the read attempts have flagged some issues via OneDrive so there could be a security issue. I think this is unlikely, but it's a possibility. I've also seen cases where OneDrive changes the name slightly, so be very careful when checking the file name. 

 


khalillx
Fluorite | Level 6
Yes I actually restarted SAS and it works now. But now I'm getting an error for a different code I will be asking about lol.
Reeza
Super User

@khalillx please mark this question as solved, by either marking the appropriate solution or by posting what the issue was and marking that as the solution. 

Kurt_Bremser
Super User

@khalillx wrote:
I removed it awhile ago.

Your log clearly says you didn't.

Quote:

50 PROC IMPORT OUT= WORK.one;
ERROR: FILE= or TABLE= is required and must be specified.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
VDD
Ammonite | Level 13 VDD
Ammonite | Level 13

this question and error I have already answer look at this link

http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a000314361.htm

then look at your code is it in the order that it needs to be?  No.

take out some of the ; that you have which are misplaced.

to get past this error look at the example to the original question here

http://communities.sas.com/t5/SAS-Programming/Why-do-I-keep-getting-this-error-message-when-I-try-to...

 

 

PROC IMPORT 
DATAFILE= "C:\Users\laura\OneDrive\Documents\econ485\project1data.csv"
OUT= SESSION1
DBMS=csv 
REPLACE;
RUN;

  also please select and mark the solutions to your questions.

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 13 replies
  • 6612 views
  • 1 like
  • 5 in conversation