Premium

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



Question : You have been given below SAS program, how many statements are there ?
data
hadoopexam.courses;
infile hadoopexam1; input name $ price ;
run;

 : You have been given below SAS program, how many statements are there ?
1. 4

2. 5

3. 6

4. 7


Correct Answer : 1
Explanation: There are four statements as you know each statements end with the semicolon. First statement spans two line but consider as a
single statement. Similarly line 3 has two statements in a single line.




Question : How do you define a SAS library?
A. It is a collection of SAS files.
B. It is a collection of physical SAS files.
C. It is a group files in a folder
D. It is a collection of folders

 : How do you define a SAS library?
1. A,B,C
2. B,C,D
3. A,C,D
4. A,B,D

Correct Answer : 1
Explanation: SAS library is a collection of files, which represent a folder on OS.




Question : Which of the following is best suitable option on all the SAS platform, so that SAS ouput can be generated in HTML format?

 : Which of the following is best suitable option on all the SAS platform, so that SAS ouput can be generated in HTML format?
1. You must use system options

2. You have to use dataset specific options

3. By default on all the platform it will be HTML format only

4. You should use proper programming statement to generate HTML format output


Correct Answer : 4
Explanation: For all the platform , option 4 is correct. You can use programming statement to generate output in HTML format.


Related Questions


Question : Due to growth within the area code, the telephone exchange is being reassigned to the area code.
The data set Clients.Piedmont includes the variable Phone, which contains telephone numbers in the form 919-555-1234.
Which of the following programs will correctly change the values of Phone?
 :  Due to growth within the  area code, the telephone exchange  is being reassigned to the  area code.
1. data work.piedmont(drop=areacode exchange);
set clients.piedmont;
Areacode=substr(phone,1,3);
Exchange=substr(phone,5,3);
if areacode='919' and exchange='555'
then scan(phone,1,3)='920';
run;
2. data work.piedmont(drop=areacode exchange);
set clients.piedmont;
Areacode=substr(phone,1,3);
Exchange=substr(phone,5,3);
if areacode='919' and exchange='555'
then phone=scan('920',1,3);
run;
3. data work.piedmont(drop=areacode exchange);
set clients.piedmont;
Areacode=substr(phone,1,3);
Exchange=substr(phone,5,3);
if areacode='919' and exchange='555'
then substr(phone,5,3)='920';
run;
4. data work.piedmont(drop=areacode exchange);
set clients.piedmont;
Areacode=substr(phone,1,3);
Exchange=substr(phone,5,3);
if areacode='919' and exchange='555'
then phone=substr('920',1,3);
run;


The SUBSTR function replaces variable values if it is placed on the left side of an assignment statement. When placed on the right side (Read explanation from Question ), the
function extracts a substring




Question : Suppose you need to create the variable FullName by concatenating the values of FirstName,
which contains first names, and LastName, which contains last names. What's the best way to remove extra blanks between first names and last names?

The SUBSTR function replaces variable values if it is placed on the left side of an assignment statement. When placed on the right side (Read explanation from  ), the
1. data work.maillist;
set retail.maillist;
length FullName $ 40;
fullname=trim firstname||' '||lastname;
run;
2. data work.maillist;
set retail.maillist;
length FullName $ 40;
fullname=trim(firstname)||' '||lastname;
run;
3. data work.maillist;
set retail.maillist;
length FullName $ 40;
fullname=trim(firstname)||' '||trim(lastname);
run;
4. data work.maillist;
set retail.maillist;
length FullName $ 40;
fullname=trim(firstname||' '||lastname);
run;


Question :
The SAS data set SASUSER.HOUSES contains a variable PRICE which has been assigned a permanent label of "Asking Price".
Which SAS program temporarily replaces the label "Asking Price" with the label "Sale Price" in the output?
 :
1. proc print data = sasuser.houses; label price = "Sale Price"; run;
2. proc print data = sasuser.houses label; label price "Sale Price"; run;
3. proc print data = sasuser.houses label; label price = "Sale Price"; run;
4. proc print data = sasuser.houses; price = "Sale Price"; run;



Question :

The following SAS program is submitted:

data work.empsalary;
set work.people (in = inemp)
work.money (in = insal);
if insal and inemp;
run;
The SAS data set WORK.PEOPLE has 5 observations, and the data set WORK.MONEY has 7 observations. How many observations will the data set WORK.EMPSALARY contain?
 :
1. 0
2. 5
3. 7
4. 12



Question :

The following SAS program is submitted:

data work.accounting;
set work.dept1 work.dept2;
jobcode = `FA1';
length jobcode $ 8;
run;

A character variable named JOBCODE is contained in both the WORK.DEPT1 and WORK.DEPT2 SAS data sets.
The variable JOBCODE has a length of 5 in the WORK.DEPT1 data set and a length of 7 in the WORK.DEPT2 data set.
What is the length of the variable JOBCODE in the output data set?

 :
1. 3
2. 5
3. 7
4. 8



Question : Given the SAS data set SASDATA.TWO:
SASDATA.TWO
X Y
----
5 2
3 1
5 6
The following SAS program is submitted:

data sasuser.one two sasdata.three;
set sasdata two;
if x = 5 then output sasuser.one;
else output sasdata two;
run;

What is the result?
 : Given the SAS data set SASDATA.TWO:
1. data set SASUSER.ONE has 5 observations
data set SASUSER.TWO has 5 observations
data set WORK.OTHER has 3 observations
2. data set SASUSER.ONE has 2 observations
data set SASUSER.TWO has 2 observations
data set WORK.OTHER has 1 observations
3. data set SASUSER.ONE has 2 observations
data set SASUSER.TWO has 2 observations
data set WORK.OTHER has 5 observations
4. No data sets are output.
The DATA step fails execution due to syntax errors