Premium

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



Question : You have below program
data course2017_1;
set course2017 end=last;
if last;
run;

Now during the compilation phase, all the variables will be created in the program data vector, and all the observation will be set to

 : You have below program
1. Blank values

2. Missing Values

3. Access Mostly Uused Products by 50000+ Subscribers

4. There will not be any observations


Correct Answer : Get Lastest Questions and Answer :
Explanation: As soon as compilation phase finished descriptor portion of the dataset will be generated. But no observations will be created.




Question : You have been wring the SAS programs, now you want to override the behavior of output generations, which of the option or statement you
will choose

 : You have been wring the SAS programs, now you want to override the behavior of output generations, which of the option or statement you
1. DROP= and KEEP= data set options

2. OUTPUT statement

3. Access Mostly Uused Products by 50000+ Subscribers

4. BY statement


Correct Answer : Get Lastest Questions and Answer :
Explanation: You need to understand the purpose of given each option in questions.
DROP= and KEEP= option will help you to what columns/variables you want in the output observations.
BY statement will help you to group the observations.
END= option to tell SAS to create a temporary numeric value whose value is used to detect the last observation.
OUTPUT statement: The OUTPUT statement tells SAS to write the current observation to a SAS data set immediately, not at the end of the DATA step. If no
data set name is specified in the OUTPUT statement, the observation is written to the data set or data sets that are listed in the DATA statement.





Question : You have been given below datasets


Which of the following program will generate result as Course100 dataset using Course101 and Course102?

 : You have been given below datasets
1. data course100;
set course101;
set course102;
run;


2. data course100;
set course101 set course102;
run;


3. Access Mostly Uused Products by 50000+ Subscribers
set course101 set course102;
by course_id;
run;


4. data course100;
merge course101 set course102;
by course_id;
run;


Correct Answer : Get Lastest Questions and Answer :
Explanation: if you know, how are all the different ways data will be joined together than this question will be easy for you. Observe
results from Course100
- It has number of observation equal to smaller dataset
- Same variable values have been overwritten by second dataset
Hence, above two things can happen when you try to combine data from two dataset using one-to-one matching set statements.



Related Questions


Question : A SAS PRINT procedure output of the WORK.LEVELS data set is listed below:
Obs name level
1 Frank 1
2 Joan 2
3 Sui 2
4 Jose 3
5 Burt 4
6 Kelly .
7 Juan 1
The following SAS program is submitted:
data work.expertise;
set work.levels;
if level = . then
expertise = 'Unknown';
else if level = 1 then
expertise = 'Low';
else if level = 2 or 3 then
expertise = 'Medium';
else
expertise = 'High';
run;
Which of the following values does the variable EXPERTISE contain?
 :  A SAS PRINT procedure output of the WORK.LEVELS data set is listed below:
1. Low, Medium, and High only
2. Low, Medium, and Unknown only
3. Low, Medium, High, and Unknown only
4. Low, Medium, High, Unknown, and ' ' (missing character value)


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

--------10-------20-------30
Ruth 39 11
Jose 32 22
Sue 30 33
John 40 44
The following SAS program is submitted:
data test;
infile 'employee';
input employee_name $ 1-4;
if employee_name = 'Ruth' then input idnum 10-11;
else input age 7-8;
run;
Which one of the following values does the variable IDNUM contain when the name of the employee is "Ruth"?
 :  The contents of the raw data file EMPLOYEE are listed below:
1. 11
2. 22
3. 32
4. . (missing numeric value)


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

--------10-------20-------30
Ruth 39 11
Jose 32 22
Sue 30 33
John 40 44
The following SAS program is submitted:
data test;
infile 'employee';
input employee_name $ 1-4;
if employee_name = 'Sue' then input age 7-8;
else input idnum 10-11;
run;
Which one of the following values does the variable AGE contain when the name of the employee is "Sue"?


 :  The contents of the raw data file EMPLOYEE are listed below:
1. 30
2. 33
3. 40
4. . (missing numeric value)


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)