These formats must be stored in the WORK.FORMATS or SASUSER.FORMATS catalog
------------------------------------------------------------------ 35.given the SAS data set SASDATA.TWO:
X Y -- -- 5 2 3 1 5 6
The following SAS program is submitted:
data SASUSER.ONE SASUSER.TWO OTHER; set SASDATA.TWO;
if X eq 5 then output SASUSER.ONE; if Y lt 5 then output SASUSER.TWO; output; run;
What is the result?
A.
data set SASUSER.ONE has 5 observations data set SASUSER.TWO has 5 observations data set WORK.OTHER has 3 observations
B.
data set SASUSER.ONE has 2 observations data set SASUSER.TWO has 2 observations data set WORK.OTHER has 1 observations
C.
data set SASUSER.ONE has 2 observations data set SASUSER.TWO has 2 observations data set WORK.OTHER has 5 observations
D. No data sets are output. The DATA step fails execution due to syntax errors.
Answer: A
------------------------------------------------------------------ 36.Given the contents of the raw data file 'EMPLOYEE.TXT':
----+----10---+----20---+----30-- Xing 2 19 2004 ACCT
Bob 5 22 2004 MKTG Jorge 3 14 2004 EDUC
The following SAS program is submitted:
data WORK.EMPLOYEE; infile 'EMPLOYEE.TXT'; input
@1 FirstName $ @15 StartDate @25 Department $; run;
Which SAS informat correctly completes the program? A. date9.
B. mmddyy10. C. ddmmyy10. D. mondayyr10.
Answer: B
-------------------------------------------------------------
37.The SAS data set Fed.Banks contains a variable Open_Date which has
been assigned a permanent label of \replaces the label \
A.
proc print data=SASUSER.HOUSES label; label Open_Date \run;
B.
proc print data=SASUSER.HOUSES label; label Open_Date=\run;
C.
proc print data=SASUSER.HOUSES; label Open_Date=\run;
D.
proc print data=SASUSER.HOUSES; Open_Date=\
run;
Answer: B
------------------------------------------------------------------
38.Given the SAS data set WORK.ONE:
X Y Z - - -- 1 A 27 1 A 33 1 B 45 2 A 52 2 B 69 3 B 70 4 A 82 4 C 91
The following SAS program is submitted:
data WORK.TWO; set WORK.ONE; by X Y; if First.Y; run;
proc print data=WORK.TWO noobs; run;
Which report is produced?
A.
X Y Z -- -- -- 1 B 45 2 A 52 2 B 69 3 B 70 4 A 82 4 C 91
B.
X Y Z -- -- --
1 A 27 1 B 45 2 A 52 2 B 69 3 B 70 4 A 82 4 C 91
C.
X Y Z -- -- -- 1 A 33 1 B 45 2 A 52 2 B 69 3 B 70 4 A 82 4 C 91
D. The PRINT procedure fails because the data set WORK.TWO is not created in the DATA step.
Answer: B
------------------------------------------------------------------
39.The following SAS program is submitted:
data WORK.AUTHORS;
array Favorites{3} $ 8 ('Shakespeare','Hemingway','McCaffrey'); run;
What is the value of the second variable in the dataset WORK.AUTHORS? A. Hemingway B. Hemingwa
C. ' ' (a missing value)
D. The program contains errors. No variables are created.
Answer: B
------------------------------------------------------------------
40.The following SAS program is submitted:
data WORK.PRODUCTS; Prod=1;
do while(Prod LE 6); Prod + 1; end; run;
What is the value of the variable Prod in the output data set?
A. 6 B. 7 C. 8
D. . (missing numeric)
Answer: B
------------------------------------------------------------------
41.Given the raw data record in the file phone.txt:
----|----10---|----20---|----30---|
Stevens James SALES 304-923-3721 14
The following SAS program is submitted:
data WORK.PHONES; infile 'phone.txt';
input EmpLName $ EmpFName $ Dept $ Phone $ Extension; <_insert_code_> run;
Which SAS statement completes the program and results in a value of \Stevens\
A. FullName=CATX(' ',EmpFName,EmpLName); B. FullName=CAT(' ',EmpFName,EmpLName); C. FullName=EmpFName!!EmpLName; D. FullName=EmpFName + EmpLName;
Answer: A
------------------------------------------------------------------
42.The following SAS program is submitted:
data WORK.ONE;
Text='Australia, US, Denmark'; Pos=find(Text,'US','i',5);