Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

SAS Exam A00-215 Topic 13 Question 47 Discussion

Actual exam question for SAS's A00-215 exam
Question #: 47
Topic #: 13
[All A00-215 Questions]

Which PROC IMPORT step correctly creates the MYDATA,SALES data set from the SALES.SCV file?

Show Suggested Answer Hide Answer
Suggested Answer: B

The correct statement to import a CSV file into SAS and create a dataset is option B. The PROC IMPORT statement is used in SAS to read data from external files and create a SAS data set. Let's break down why option B is correct:

datafile= specifies the location and filename of the external data file. In this case, 'sales.csv' is the correct filename and format for a CSV file.

dbms=csv tells SAS that the format of the external data file is CSV (comma-separated values).

out=mydata.sales; specifies the name of the output SAS dataset. It consists of two parts: the libref mydata and the dataset name sales. This tells SAS to store the new dataset in a library called mydata with the dataset name sales.

Option A uses an incorrect syntax as it incorrectly specifies the data= option, which is not valid in this context. Also, the out= option is incorrectly quoted and terminated with a semicolon within the quotes.

Option C has a typo in the out= option (out=mydata.gales;), which incorrectly specifies the output dataset name. Additionally, it incorrectly specifies the data= option, which should actually be datafile=.

Option D has incorrectly quoted the out= option and uses a hyphen instead of an equals sign. Additionally, it does not use quotes around the filename, which may cause issues if the filename contains special characters or spaces.

Reference: SAS 9.4 documentation, specifically the PROC IMPORT statement: SAS Help Center: PROC IMPORT Statement


Contribute your Thoughts:

Miesha
9 hours ago
I disagree, I believe the correct answer is B.
upvoted 0 times
...
Shonda
1 days ago
Ah, the age-old debate of quoting versus not quoting. I say, why not just use Option B and call it a day? It's the middle ground, you know, like a good cup of coffee.
upvoted 0 times
...
Leonora
6 days ago
Hmm, Option A seems the most straightforward to me. The DATAFILE parameter has the file name, and the OUT parameter has the data set name in quotes. Simple and elegant!
upvoted 0 times
...
Fatima
15 days ago
I think the correct answer is A.
upvoted 0 times
...
Sean
1 months ago
I think Option D is the way to go. The DATA parameter should have the data set name without quotes, and the OUT parameter should have the data set name without quotes as well.
upvoted 0 times
...
Franchesca
1 months ago
Option B looks correct to me. The DATAFILE parameter should have the file name in quotes, and the OUT parameter should have the data set name without quotes.
upvoted 0 times
Taryn
2 days ago
User 1: I think option B is the correct one.
upvoted 0 times
...
...

Save Cancel