Preguntas 71 85
Preguntas 71 85
QUESTION: 71
QUESTION: 72
The SAS data set named WORK.SALARY contains 10 observations for each department, and is currently ordered by
Department. The following SAS program is submitted:
data WORK.TOTAL;
set WORK.SALARY(keep=Department MonthlyWageRate);
by Department;
if First.Department=1 then Payroll=0;
Payroll+(MonthlyWageRate*12);
if Last.Department=1;
run;
QUESTION: 73
Given the contents of the raw data file TYPECOLOR.DAT:
----+----10---+----20---+ -- 30 daisyyellow The following SAS program is submitted:
data FLOWERS;
infile 'TYPECOLOR.DAT' truncover;
length
Type $ 5
Color $ 11;
input
Type $
Color $;
run;
A. Type=daisy, Color=w
B. Type=daisy, Color=daisyyellow
C. Type=daisy, Color=
QUESTION: 74
The following SAS program is submitted:
data WORK.TEST;
set WORK.MEASLES(keep=Janpt Febpt Marpt);
array Diff{3} Difcount1-Difcount3;
array Patients{3} Janpt Febpt Marpt;
run;
QUESTION: 75
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 "James Stevens" for the variableFullName?
A. FullName=CATX(' ',EmpFName,EmpLName);
B. FullName=CAT(' ',EmpFName,EmpLName);
C. FullName=EmpFName!!EmpLName;
D. FullName=EmpFName + EmpLName;
QUESTION: 76
Which statement specifies that records 1 through 10 are to be read from the raw data file customer.txt?
QUESTION: 77
The following SAS program is submitted:
data WORK.ONE;
Text='Australia, US, Denmark';
Pos=find(Text,'US','i',5);
run;
A. 0
B. 1
C. 2
D. 12
QUESTION: 78
Given the following raw data records in DATAFILE.TXT:
| 10 | 20 | 30
Kim,Basketball,Golf,Tennis
Bill,Football
Tracy,Soccer,Track
The following program is submitted:
data WORK.SPORTS_INFO;
length Fname Sport1-Sport3 $ 10;
infile 'DATAFILE.TXT' dlm=',';
input Fname $ Sport1 $ Sport2 $ Sport3 $;
run;
proc print data=WORK.SPORTS_INFO;
run;
QUESTION: 79
4
The SAS data set WORK.ONE contains a numeric variable named Num ana character variable
named Char:
WORK.ONE
Num Char
1 23
3 23
1 77
The following SAS program is submitted:
proc print data=WORK.ONE;
where Num='1';
run;
What is output?
A. Num Char
1 23
B. Num Char
1 23
1 77
C. Num Char
1 23
3 23
1 77
D. No output is generated.
QUESTION: 80
The following output is created by the FREQUENCY procedure:
Which TABLES statement was used to completed the following program that produced the output?
QUESTION: 81
The following SAS program is submitted:
<_insert_ods_code_>
proc means data=SASUSER.SHOES;
where Product in ('Sandal' , 'Slipper' , 'Boot');
run;
<_insert_ods_code_>
Which ODS statements inserted, respectively, in the two location above creates a report stored in
an html file?
QUESTION: 82
Given the following data step:
data WORK.GEO;
infile datalines;
input City $20.;
if City='Tulsa' then
State='OK';
Region='Central';
if City='Los Angeles' then
State='CA'
Region='Western';
datalines;
Tulsa
Los Angeles
Bangor
;
run;
After data step execution, what will data set WORK.GEO contain?
Tulsa OK Western
Los Angeles CA Western
Bangor Western
B. City State Region
Tulsa OK Western
Los Angeles CA Western
Bangor
C. City State Region
Tulsa OK Central
Los Angeles CA Western
Bangor Western
D. City State Region
Tulsa OK Central
Los CA Western
Bangor
QUESTION: 83
Which of the following choices is an unacceptable ODS destination for producing output that can
be viewed in Microsoft Excel?
47
A. MSOFFICE2K
B. EXCELXP
C. CSVALL
D. WINXP
QUESTION: 84
Which statement describes a characteristic of the SAS automatic variable _ERROR_?
A. The _ERROR_ variable maintains a count of the number of data errors in a DATA step.
B. The _ERROR_ variable is added to the program data vector and becomes part of the data set
being created.
C. The _ERROR_ variable can be used in expressions in the DATA step.
D. The _ERROR_ variable contains the number of the observation that caused the data error.
QUESTION: 85
The Excel workbook REGIONS.XLS contains the following four worksheets:
EAST
WEST
NORTH
SOUTH
The following program is submitted: