EZ Study

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

SAS Programing Certification Exam
Practice Questions & Answer set-37

Practice Question 179

The contents of the SAS data set named PERM.STUDENTS are listed below:
name age
Alfred 14
Alice 13
Barbara 13
Carol 14
The following program is submitted using the PERM.STUDENTS data as input:
libname perm 'SAS-data-library';
data students;
set perm.students;     file 'file-specification';
Click to Get Those Highly Recommended SAS Programmers' Books
put name $15. @5 age 2.;     run;
Which one of the following represents the values written to the output raw data file?
A. --------10-------20-------30
Alfred 14
Alice 13
Barbara 13
Carol 14
B. --------10-------20-------30
Alfr14
Alic13
Barb13a
Caro14
C. --------10-------20-------30
Alfr14ed
Alic13e
Barb13ara
Caro14l
D. --------10-------20-------30
Alfred 14
Alice 13
Barbara 13
Carol 14


Answer is B.

Practice Question 180

The contents of the SAS data set PERM.JAN_SALES are listed below:
VARIABLE NAME TYPE
idnum character variable
sales_date numeric date value
A comma delimited raw data file needs to be created from the PERM.JAN_SALES data set. The SALES_DATE values need to be in
a MMDDYY10 form.
Which one of the following SAS DATA steps correctly creates this raw data file?
A. libname perm 'SAS-data-library';
data _null_;
set perm.jan_sales;
file 'file-specification' dsd = ',';
put idnum sales_date : mmddyy10.; run;
B. libname perm 'SAS-data-library';
data _null_;
set perm.jan_sales;
file 'file-specification' dlm = ',';
put idnum sales_date : mmddyy10.; run;

C. libname perm 'SAS-data-library';
data _null_;
set perm.jan_sales;
file 'file-specification';
put idnum sales_date : mmddyy10. dlm = ',';run;
D. libname perm 'SAS-data-library';
data _null_;
set perm.jan_sales;
file 'file-specification';
put idnum sales_date : mmddyy10. dsd = ','; run;


Answer is B. A is not correct as the default delimeter (,) for DSD is defined as dsd = ','. It is correct if it was used as: DSD Ans C and D are not correct because of using the options dlm and dsd in PUT statement. They are the INFILE options.

Practice Question 181

A raw data record is shown below:
07Jan2002
Which one of the following informats would read this value and store it as a SAS date value?
A. date9.     B. ddmonyy9.     C. ddMMMyy9.     D. ddmmmyyyy9.


Answer is A.

Related links:

Continue to SAS Practice Exam Question Answer Set-38   SAS interview Questions Answers
Back to SAS Practice Exam Question Answer Set-36   SAS Tutorial   Statistics Tutorial