SAS Certified Base Programmer 123 Questions (39)
A raw data file is listed below:
----|----10---|----20---|----30 John McCloskey 35 71 June Rosesette 10 43 TinekeJones 9 37
The following SAS program is submitted using the raw data file as input:
data work.homework; infile 'file-specification'; input name $ age height; if age LE 10; run;
How many observations will the WORK.HOMEWORK data set contain?
A. 0
B. 2
C. 3
D. No data set is created as the program fails to execute due to errors.
Topics:
SAS Base Questions |
9 Comments »
C
I tested this and it was wrong. It should be B
@2. AMJ….I have checked it..the answer is C….
Por favor revisar a respuesta es B cuando se toma la información desde un Raw data file se tiene 2 observaciones. por favor puede revisar el sigueinte código
LIBNAME sas1 ‘C:\estudio sas\s1.txt’;
DATA Y;
INFILE sas1;
INPUT NAME $ AGE HEIGHT;
IF AGE LE 10;
;
RUN;
PROC PRINT DATA= Y; RUN;
@Nethe Please write your comment in ENGLISH!
C is the correct answer. age is taken as missing value……..so less 9 for sure….try it with same data….
C is the right answer. since there are two words in the name, age is considered as missing in the first two observations.In the third observation name has a single word and the age is 9. that is the reason all the observations are printed.
B is right one since the third observation should be . 43 . and
43>9
it use ” ” as the delimiter.
I means it uses a space as the delimiter.