Premium

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



Question : You have been given below SAS dataset, what is the type of the name variable
 : You have been given below SAS dataset, what is the type of the name variable
1. Numeric

2. Character

3. Floating Point Number

4. Variable


Correct Answer : 2
Explanation: As you can see, it contains all the character values. Hence, it will be a character type. In the character type variable you
can have all the values as numeric.




Question : In the given dataset, what is the datatype of date variable?


 : In the given dataset, what is the datatype of date variable?
1. Date

2. Character

3. Numeric

4. Floating Point


Correct Answer : 3
Explanation: As you can see all the values are numeric and missing value is shown as a . (dot), which is in case of only numeric values and
for character type missing value is shown as a blank space. And there are no data types like Date and Floating point in SAS.




Question : You have set a system option like VALIDVARNAME=ANY. Which of the following is a valid variable name?

 : You have set a system option like VALIDVARNAME=ANY. Which of the following is a valid variable name?
1. 4HadoopExam

2. $Price

3. _HadoopExam_

4. Hadoop-Exam

5. All of the above are fine


Correct Answer : 3
Explanation: Rules are the same, when you use the SAS variables name. It can contain any characters a to z, underscore and numbers. Must
start with either character or underscore. You can not have " in between, hence option 4 is out.


Related Questions


Question : The following SAS program is submitted:

libname sasdata 'SAS-data-library';
data test;
set sasdata.chemists;
if jobcode = 'Chem2'
then description = 'Senior Chemist';
else description = 'Unknown';
run;
A value for the variable JOBCODE is listed below:
JOBCODE
chem2
Which one of the following values does the variable DESCRIPTION contain?

 :  The following SAS program is submitted:
1. Chem2
2. Unknown
3. Senior Chemist
4. ' ' (missing character value)


Question : The following SAS program is submitted:

data work.flights;
destination = 'cph';
select(destination);
when('LHR') city = 'London';
when('CPH') city = 'Copenhagen';
otherwise city = 'Other';
end;
run;
Which one of the following is the value of the CITY variable?

 :  The following SAS program is submitted:
1. Other
2. Copenh
3. Copenhagen
4. ' ' (missing character value)


Question :

The following SAS program is submitted:

data work.flights;
destination = 'CPH';
select(destination);
when('LHR') city = 'London';
when('CPH') city = 'Copenhagen';
otherwise;
end;
run;

Which one of the following is the value of the CITY variable?

 :
1. London
2. Copenh
3. Copenhagen
4. ' ' (missing character value)


Question :

The following SAS program is submitted:

data work.new;
length word $7;
amount = 4;
if amount = 4 then word = 'FOUR';
else if amount = 7 then word = 'SEVEN';
else word = 'NONE!!!';
amount = 7;
run;

Which one of the following represents the values of the AMOUNT and WORD variables?

 :
1. amount word
7 FOUR
2. amount word
7 SEVEN
3. amount word
4 FOUR
4. amount word
4 ' ' (missing character value)




Question :

The SAS data set EMPLOYEE_INFO is listed below:

IDNumber Expenses
2542 100.00
3612 133.15
2198 234.34
2198 111.12
The following SAS program is submitted:
proc sort data = employee_info;

run;
Which one of the following BY statements completes the program and sorts the data sequentially by descending expense values within
each descending IDNUMBER value?
 :
1. by descending IDNumber Expenses;
2. by (IDNumber Expenses) descending;
3. by IDNumber descending Expenses descending;
4. by descending IDNumber descending Expenses;



Question :

The SAS data set QTR1_REVENUE is listed below:

destination revenue
YYZ 53634
FRA 62129
FRA 75962
RDU 76254
YYZ 82174
The following SAS program is submitted:
proc sort data = qtr1_revenue;
by destination descending revenue;
run;

Which one of the following represents the first observation in the output data set?
 :
1. destination revenue
YYZ 82174
2. destination revenue
YYZ 53634
3. destination revenue
FRA 62129
4. destination revenue
FRA 75962