Multiple choice technology programming languages

data sample1; infile 'example2.dat'; input caseid 1-4 mathsat 6-8 score 10-11 sex $ 13 teach 15 format sex $fsex.; label caseid='Subject Number' mathsat='SAT Math Score' score='Final Calculus Score' sex='Sex of Participant' teach='Student Rated Teaching Ability'; proc freq data=sample1; tables sex teach; run; What is the mistake?

  1. Run is missing

  2. semi colon missing

  3. no problem

  4. cannot use label in data step

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In SAS code, the FORMAT statement in the DATA step is missing a semicolon at the end. Line 4 ends with 'format sex $fsex.;' but the LABEL statement immediately follows on the same logical line without proper termination, causing a syntax error.