EZ Study

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

SAS Programing Certification Exam
Practice Questions & Answer set-9

Practice Question 36

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 PERM.STUDENTS dataset 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 B The absolute pointer @5 starts dumping the age values at position 5

Practice Question 37

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';


Answer: B The answer needs a File statement with dlm=',' and input with date format mmddyy10.

Practice Question 38

data _null_;
set perm.jan_sales;     file 'file-specification';

put idnum sales_date : mmddyy10. dsd = ',';     run;
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: A

Related links:

Continue to SAS Practice Exam Question Answer Set-10   SAS interview Questions Answers
Back to SAS Practice Exam Question Answer Set-8   SAS Tutorial   Statistics Tutorial