Premium

Base SAS Certified Associate: Programming Fundamentals Using SAS Questions and Answers (Dumps and Practice Questions)



Question : You have been given two dates as Dec and Jan, now you need to make sure that the date read by the SAS system as above, what
value you should specify for the YEARCUTOFF= option?

 : You have been given two dates as Dec and Jan, now you need to make sure that the date read by the SAS system as above, what
1. YEARCUTOFF=46

2. YEARCUTOFF=55

3. YEARCUTOFF=45

4. YEARCUTOFF=54

5. Any value, you can specify


Correct Answer : 5
Explanation: As you can see date is given in correct form with the 4 digit year. Hence, it does not matter whether you specify any value to
YEARCUTOFF= option.




Question : : You are working in a company named Acmeshell Inc. which has SAS licensed software. However, you have been asked to use specific SAS
engine while working on the data set, why?

 : : You are working in a company named Acmeshell Inc. which has SAS licensed software. However, you have been asked to use specific SAS
1. Because any temporary files created by the SAS will depend on this engine.

2. You may have to use specific files generated in Acmeshell needs to be read by SAS

3. It will make sure that you will be always using the latest version of the SAS software

4. It will specify the file format for files that will be stored in the library.


Correct Answer : 4
Explanation: SAS Engine : It will use set of internal instructions that SAS uses for writing to and from files in a SAS library. Engine will
specifies the file format for the files that are stored in the library. which in turn enables SAS to access files with a particular format. It can even
help in situations where you want to read vendor specific files and you have to use respective SAS engine.




Question : The contents of the raw data file SIZE are listed below:

--------10-------20-------30
72 95
The following SAS program is submitted:
data test;
infile 'size';
input @1 height 2. @4 weight 2;
run;
Which one of the following is the value of the variable WEIGHT in the output data set?



 : The contents of the raw data file SIZE are listed below:
1. 2
2. 72
3. 95
4. . (missing numeric value)


Correct Answers: 2

Explanation: Since there is no period after weight2(weight2.) the pointer will move to column 2
Since the 2. is not specified correctly, it considers 2 as column input and moves the pointer to column 2.
also remember, if you just specified @4 weight;
it would still be ok and it will give the correct value 95.



Related Questions


Question : The following SAS program is submitted:
footnote1 `Sales Report for Last Month';
footnote2 `Selected Products Only';
footnote3 `All Regions';
footnote4 `All Figures in Thousands of Dollars';
proc print data = sasuser.shoes;
footnote2 `All Products';
run;
Which footnote(s) is/are displayed in the report?
 : The following SAS program is submitted:
1. All Products
2. Sales Report for Last Month All Products
3. All Products All Regions All Figures in Thousands of Dollars
4. Sales Report for Last Month All Products All Regions All Figures in Thousands of Dollars


Question : Given the raw data record DEPT:
----|----10---|----20---|----30
Printing 750
The following SAS program is submitted:
data bonus;
infile `dept';
input dept $ 1-11 number 13- 15;
$insert statement here$
run;
Which SAS statement completes the program and results in a value of `Printing750' for the DEPARTMENT variable?
 : Given the raw data record DEPT:
1. department = dept II number;
2. department = left(dept) II number;
3. department = trim(dept) number;
4. department = trim(dept) put(number,3.);


Question : The following SAS program is submitted:
data one;
address1 = `214 London Way';
run;
data one;
set one;
address = tranwrd(address1, `Way', `Drive');
run;

What are the length and value of the variable ADDRESS?
 : The following SAS program is submitted:
1. Length is 14; value is `214 London Dri'.
2. Length is 14; value is `214 London Way'.
3. Length is 16; value is `214 London Drive'.
4. Length is 200; value is `214 London Drive'.


Question :The following SAS program is submitted:

data work.sets;
do until (prod gt 6);
prod + 1;
end;
run;

What is the value of the variable PROD in the output data set?

 :The following SAS program is submitted:
1. 6
2. 7
3. 8
4. . (missing numeric)


Question :The SAS data sets WORK.EMPLOYEE and WORK.SALARY are shown below:
WORK.EMPLOYEE WORK.SALARY
fname age name salary
Bruce 30 Bruce 25000
Dan 40 Bruce 35000
Dan 25000
The following SAS program is submitted:
data work.empdata;
by fname;
totsal + salary;
run;
Which one of the following statements completes the merge of the two data sets by the FNAME variable?
 :The SAS data sets WORK.EMPLOYEE and WORK.SALARY are shown below:
1. merge work.employee
work.salary (fname = name);
2. merge work.employee
work.salary (name = fname);
3. merge work.employee
work.salary (rename = (fname = name));
4. merge work.employee
work.salary (rename = (name = fname));


Question :
The SAS data set PETS is sorted by the variables TYPE and BREED.
The following SAS program is submitted:
proc print data = pets;
var type breed;
sum number;
run;
What is the result?

 :
1. The SUM statement produces only a grand total of NUMBER.
2. The SUM statement produces only subtotals of NUMBER for each value of TYPE.
3. The SUM statement produces both a grand total of NUMBER and subtotals of NUMBER for each value of TYPE.
4. Nothing is produced by the SUM statement; the program fails to execute.