nerdexam
SAS_Institute

A00-280 · Question #97

A SAS program is submitted and the following log is written. 893 data WORK.CHECKVISITS; 894 array VISDT VISDT1-VISDT4 (keep=PATID VISDTO VISDT1 VISDT2 VISDT3 VISDT4); 895 array VISDT{1:4}; 896 do…

The correct answer is D. The IF statement tries to get ARRAY elements which are not declared. See the full explanation below for the reasoning.

Question

A SAS program is submitted and the following log is written. 893 data WORK.CHECKVISITS; 894 array VISDT VISDT1-VISDT4 (keep=PATID VISDTO VISDT1 VISDT2 VISDT3 VISDT4); 895 array VISDT{1:4}; 896 do i=1 to 4; 897 if VISDT(i) ?VISDT(i-1) gt 10 then output; 898 end; 899 run; ERROR: Array subscript out of range at line 897 column 21. What is the cause of this error message?

Options

  • AThe ARRAY declaration is syntactically incorrect.
  • BThe IF statement is syntactically incorrect.
  • CThe DO loop tries to get a value from a variable which does not exist.
  • DThe IF statement tries to get ARRAY elements which are not declared.

How the community answered

(53 responses)
  • A
    4% (2)
  • B
    8% (4)
  • C
    15% (8)
  • D
    74% (39)

Community Discussion

No community discussion yet for this question.

Full A00-280 Practice