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?

 

  1. grandtot = sum cost;
  2. Get all Questions and Answer from here
  3. You need to have paid subscription to access all questions
  4. 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.