Dears,
During completion practical tasks I faced ERROR (actually two, but I think that the second will be resolved on its own when the first one is fixed): Output SAS data set must be provided.
Level 2 Practice: Importing Data from a CSV File
My code is slightly different comparing to the answer provided to the task, but it doesn't work either way:
proc import datafile="/home/u61696289/EPG1V2/data/np_traffic.csv";
dbms=csv
out=np_traffic replace;
run;
proc contents data=np_traffic;
run;
Answer to the task:
Replace FILEPATH with the path to your EPG1V2/data folder. If you are using Enterprise Guide, replace FILEPATH with &path.
proc import datafile="FILEPATH/np_traffic.csv" dbms=csv out=traffic replace; run; proc contents data=traffic; run;
I also noticed that dbms and out are not highlighted in blue like it was during one of the previous tasks.
The pdf log is attached.
Would anyone advise me what shall I do to fix this issue?
Thank you in advance.
Best regards.
Since I never download file attachments, I request that you copy the LOG as text, and include it in your reply by clicking on the </> icon and pasting it into the window that appears.
Log: Program 1 1/1 1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; 72 73 proc import datafile="/home/u61696289/EPG1V2/data/np_traffic.csv"; ERROR: Output SAS data set must be provided. NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE IMPORT used (Total process time): real time 0.00 seconds user cpu time 0.00 seconds system cpu time 0.00 seconds memory 180.78k OS Memory 27300.00k Timestamp 24.06.2022 01:08:23 пп Step Count 30 Switch Count 0 Page Faults 0 Page Reclaims 19 Page Swaps 0 Voluntary Context Switches 0 Involuntary Context Switches 0 Block Input Operations 0 Block Output Operations 0 74 dbms=csv 75 out=np_traffic replace; 76 run; 77 78 proc contents data=np_traffic; ERROR: File WORK.NP_TRAFFIC.DATA does not exist. 79 run; NOTE: Statements not processed because of errors noted above. NOTE: PROCEDURE CONTENTS used (Total process time): real time 0.00 seconds user cpu time 0.00 seconds system cpu time 0.00 seconds memory 488.31k OS Memory 27560.00k Timestamp 24.06.2022 01:08:23 пп Step Count 31 Switch Count 0 Page Faults 0 Page Reclaims 92 Page Swaps 0 Voluntary Context Switches 0 Involuntary Context Switches 0 Block Input Operations 0 Block Output Operations 8 NOTE: The SAS System stopped processing this step because of errors. 80 81 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; 93
You will be less likely to make this mistake if you get in the habit of placing the ending semicolon of a multiple line statement on a new line. Like you place the END for do a DO/END block.
proc import datafile="FILEPATH/np_traffic.csv"
dbms=csv
out=traffic
replace
;
run;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Follow along as SAS technical trainer Dominique Weatherspoon expertly answers all your questions about SAS Libraries.
Find more tutorials on the SAS Users YouTube channel.