nerdexam
SAS_Institute

A00-280 · Question #86

Given the following SAS program: data one; input subjid 1-2 trt $ 4-5 result $ 6-7 dtime 9-10 age 11-12; datalines; O1 A PR 1 56 O3 A PB 2 47 O4 B CR 2 29 O4 1 BL 1 39 O6 C SD 3 12 O7 C PD 2 90 O1 A…

The correct answer is A. if indexc(TRT, 'ABC') eq 0 then output. See the full explanation below for the reasoning.

Question

Given the following SAS program: data one; input subjid 1-2 trt $ 4-5 result $ 6-7 dtime 9-10 age 11-12; datalines; O1 A PR 1 56 O3 A PB 2 47 O4 B CR 2 29 O4 1 BL 1 39 O6 C SD 3 12 O7 C PD 2 90 O1 A SD 0 43 O3 B PD 1 25 ; run; Which statement correctly identifies invalid values in the variable TRT, if only the values 'A', 'B', 'C' are valid?

Options

  • Aif indexc(TRT, 'ABC') eq 0 then output;
  • Bif index(TRT, 'ABC') eq 0 then output;
  • Cif find(TRT, 'ABC') eq 0 then output;
  • Dif indexw(TRT, 'ABC') eq 0 then output;

How the community answered

(25 responses)
  • A
    76% (19)
  • B
    8% (2)
  • C
    4% (1)
  • D
    12% (3)

Community Discussion

No community discussion yet for this question.

Full A00-280 Practice