EZ Study

Actuarial Biology Chemistry Economics Calculators Confucius Engineer
Physics
C.S.

SAS Programing Certification Exam
Practice Questions & Answer set-

### Practice Question 191

To evaluate expressions using integer arithmetic under the MACRO facility, the _____function is used.
a) %eval   b) %perform   c) %compute   d) %evaluate

%EVAL function is used to evaluate expressions using Integer arithmetic under the Macro facility. The macro TEST uses %EVAL to increment the value of the macro variable I by 1. Also, the %DO %WHILE statement implicitly calls %EVAL to evaluate whether I is greater than the value of the macro variable FINISH.

### Practice Question 192

The following SAS program is submitted:
libname rawdata1 'location of SAS data library';
filename rawdata2 'location of raw data file';

data work.testdata; infile ....;
input sales1 sales2;
run;

Which one of the following is needed to complete the program correctly?

A. rawdata1   B. rawdata2   C. 'rawdata1'   D. 'rawdata2'

Answer: B

### Practice Question 193

The SAS data set named WORK.TEST is listed below: Which one of the following SAS programs created this data set?

capacity    airplanetype     staff
-------------------------------
150           Large             10
A. data work.test;
capacity = 150;
if 100 le capacity le 200 then airplanetype = 'Large' and staff = 10;
else airplanetype = 'Small' and staff = 5; run;

B. data work.test;
capacity = 150;
if 100 le capacity le 200 then do;
airplanetype = 'Large';
staff = 10;
end; else do;
airplanetype = 'Small';

staff = 5;
end;   run;

C. data work.test;
capacity = 150;
if 100 le capacity le 200 then do;
airplanetype = 'Large';
staff = 10;
else do;
airplanetype = 'Small'; airplanetype = 'Small';
staff = 5;
end;   run;

D. data work.test;
capacity = 150;
if 100 le capacity le 200 then;
airplanetype = 'Small'; airplanetype = 'Small';
staff = 5;
else;
airplanetype = 'Large'; airplanetype = 'Large';
staff = 10;   run;

Answer: B

### Practice Question 194

The following SAS program is submitted and reads 100 records from a raw data file:

data work.total;     infile 'file-specification' end = eof;
Click to Get Those Highly Recommended SAS Programmers' Books
input name \$ salary;     totsal + salary;     run;
Which one of the following IF statements writes the last observation to the output data set?
A. if end = 0;     B. if eof = 0;     C. if end = 1;     D. if eof = 1;

Answer: D
Related links:

Continue to SAS Practice Exam Question Answer Set-41   SAS interview Questions Answers
Back to SAS Practice Exam Question Answer Set-39   SAS Tutorial   Statistics Tutorial