Question 39 :
A raw data file is listed below:
--------10-------20-------30
squash 1.10
apples 2.25
juice 1.69
The following SAS program is submitted using the raw data file above:
data groceries;
infile 'file-specification';
input item $ cost;
run;
Which one of the following completes the program and produces a grand total for all COST values?
- grandtot = sum cost;
- Get all Questions and Answer from here
- You need to have paid subscription to access all questions
- Thanks for considering SAS Certification Material
Correct Answer : 3
Exp : : sum is a function which means it will need brackets () so A is not the correct answer.
1 has incorrect syntax and will not compile. The idea of "sum cost" has some merit in the context of a proc print situation, but used in an assignment statement like this, it's just garbage.
You can access to full explanation to question and answer from this page.