nerdexam
SAS_Institute

A00-202 · Question #49

The following SAS program is submitted: options yearcutoff = 1950; %macro y2kopt(date); %if &date >= 14610 %then %do; options yearcutoff = 2000; %end; %else %do; options yearcutoff = 1900; %end…

The correct answer is A. 2000. See the full explanation below for the reasoning.

Question

The following SAS program is submitted:

options yearcutoff = 1950; %macro y2kopt(date); %if &date >= 14610 %then %do; options yearcutoff = 2000; %end; %else %do; options yearcutoff = 1900; %end; %mend; data null ; date = "01jan2000"d; call symput("date",left(date)); run; %y2kopt(&date) The SAS date for January 1, 2000 is 14610 and the SAS system option for YEARCUTOFF is set to 1920 prior to submitting the above program. Which one of the following is the value of YEARCUTOFF when the macro finishes execution?

Options

  • A2000
  • B1950
  • C1920
  • D1900

How the community answered

(62 responses)
  • A
    79% (49)
  • B
    3% (2)
  • C
    11% (7)
  • D
    6% (4)

Community Discussion

No community discussion yet for this question.

Full A00-202 Practice