Question 46 :

 The following SAS program is submitted:

 data work.company;

 set work.dept1(keep = jobcode)

 work.dept2(rename = (jcode = jobcode));

 run;

 Which one of the following is the result?

 

  1. The variable JCODE is written to the output data set.
  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 : 2

 Exp : The variable jcode in the second dataset is renamed as JOBCODE and since there is no BY variable specified, the datasets are simply appended one on top without any overwriting.

 The code above can be rewritten in a way that set and the two datasets are in the same line. So the set statement continues till the end of work.dept2(rename = (jcode = jobcode));

You can access to full explanation to question and answer from this page.