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

I am confused to why I got this quiz question incorrect (I chose "a" but the correct answer is "b"):

 

9. What does this code do?

 

proc import datafile="d:/collect817/bird_count.csv"
            dbms=csv out=bird817 replace;
run;

 

 a.  It creates a SAS data set named bird817 in the work library from the CSV file bird_count and replaces bird817 whenever the CSV file is updated.
 b.  It creates a SAS data set named bird817 in the work library from the CSV file bird_count.
 c.  It uses the CSV engine to directly read the data file bird_count.csv.
1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

@AJS1 wrote:

I am confused to why I got this quiz question incorrect (I chose "a" but the correct answer is "b"):

 

9. What does this code do?

 

proc import datafile="d:/collect817/bird_count.csv"
            dbms=csv out=bird817 replace;
run;

 

 a.  It creates a SAS data set named bird817 in the work library from the CSV file bird_count and replaces bird817 whenever the CSV file is updated.
 b.  It creates a SAS data set named bird817 in the work library from the CSV file bird_count.
 c.  It uses the CSV engine to directly read the data file bird_count.csv.

The key different in this case is the clause "whenever the CSV file is updated.". Since the Proc Import would need to be rerun when the CSV file is updated then that makes A incorrect.

 

 

View solution in original post

3 REPLIES 3
novinosrin
Tourmaline | Level 20

HI @AJS1  The tricky part is "whenever the CSV file is updated."

 

Proc import doesn't have the artificial intelligence to know when a CSV file is updated however when and everytime it is executed, it creates a file as named. So B is straight to the point. Smiley Happy

 

Plus the replace is merely overwrite feature.

ballardw
Super User

@AJS1 wrote:

I am confused to why I got this quiz question incorrect (I chose "a" but the correct answer is "b"):

 

9. What does this code do?

 

proc import datafile="d:/collect817/bird_count.csv"
            dbms=csv out=bird817 replace;
run;

 

 a.  It creates a SAS data set named bird817 in the work library from the CSV file bird_count and replaces bird817 whenever the CSV file is updated.
 b.  It creates a SAS data set named bird817 in the work library from the CSV file bird_count.
 c.  It uses the CSV engine to directly read the data file bird_count.csv.

The key different in this case is the clause "whenever the CSV file is updated.". Since the Proc Import would need to be rerun when the CSV file is updated then that makes A incorrect.

 

 

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!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1383 views
  • 0 likes
  • 3 in conversation