EZ Study

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

SAS Programing Certification Exam
Practice Questions & Answer set-8

Practice Question 31

The contents of the raw data file TEAM are listed below:

--------10-------20-------30
Janice 10
Henri 11
Michael 11
Susan 12

The following SAS program is submitted:
data group;     infile 'team';     input name $15. age 2.;
Click to Get Those Highly Recommended SAS Programmers' Books
file 'file-specification';     put name $15. +5 age 2.;
run;
Which one of the following describes the output created?

A. a raw data file only
B. a SAS data set named GROUP only
C. a SAS data set named GROUP and a raw data file
D. No output is generated as the program fails to execute due to errors.

Answer is C. FILE statement specifies the current output file for PUT statements. PUT statement writes lines to an external location that is specified in the most recent FILE statement.

Practice Question 32

The following SAS program is submitted:
data allobs;     set sasdata.origin (firstobs = 75 obs = 499);

run;    
The SAS data set SASDATA.ORIGIN contains 1000 observations.
How many observations does the ALLOBS data set contain?
A. 424     B. 425     C. 499     D. 1000

Answer: B Obs count = 499-75+1

Practice Question 33

The following SAS program is submitted:
data _null_;
set old (keep = prod sales1 sales2);
file 'file-specification';
put sales1 sales2;
run;
Which one of the following default delimiters separates the fields in the raw data file created?

A. : (colon)     B. (space)     C. , (comma)     D. ; (semicolon)

Answer: B The default delimiter is space / blank

Practice Question 34

The following SAS program is submitted:
data _null_;
set old;
put sales1 sales2;
run;
Where is the output written?

A. the SAS log
B. the raw data file that was opened last
C. the SAS output window or an output file
D. the data set mentioned in the DATA statement

Answer: A

Practice Question 35

The contents of the raw data file TEAM are listed below:

--------10-------20-------30
Janice 10
Henri 11
Michael 11
Susan 12

The following SAS program is submitted:
data group;
infile 'team';
input name $15. age 2.;
file 'file-specification';
put name $15. +5 age 2.;
run;
Which one of the following describes the output created?

A. a raw data file only
B. a SAS data set named GROUP only
C. a SAS data set named GROUP and a raw data file
D. No output is generated as the program fails to execute due to errors.

Answer: C

Related links:

Continue to SAS Practice Exam Question Answer Set-9   SAS interview Questions Answers
Back to SAS Practice Exam Question Answer Set-7   SAS Tutorial   Statistics Tutorial