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

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.

SAS Studio issue.jpg

SASRB_0-1656077274807.png

The pdf log is attached.

 

Would anyone advise me what shall I do to fix this issue?

Thank you in advance.

Best regards.

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hello @SASRB and welcome to the SAS Support Communities!

 


@SASRB wrote:

proc import datafile="/home/u61696289/EPG1V2/data/np_traffic.csv";
dbms=csv
out=np_traffic replace;
run;


The options (DBMS= and OUT=) must not be separated by a semicolon from the PROC IMPORT statement they belong to.

View solution in original post

5 REPLIES 5
PaigeMiller
Diamond | Level 26

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.

2021-11-26 08_27_29-Reply to Message - SAS Support Communities — Mozilla Firefox.png

--
Paige Miller
SASRB
Obsidian | Level 7
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
FreelanceReinh
Jade | Level 19

Hello @SASRB and welcome to the SAS Support Communities!

 


@SASRB wrote:

proc import datafile="/home/u61696289/EPG1V2/data/np_traffic.csv";
dbms=csv
out=np_traffic replace;
run;


The options (DBMS= and OUT=) must not be separated by a semicolon from the PROC IMPORT statement they belong to.

SASRB
Obsidian | Level 7
Indeed, that was the reason. Thank you very much.
Tom
Super User Tom
Super User

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;

SAS Innovate 2025: Call for Content

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!

Submit your idea!

LIBNAME 101

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.

Discussion stats
  • 5 replies
  • 2427 views
  • 8 likes
  • 4 in conversation