Premium

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



Question : You have been given below dataset

Which of the following is a correct SAS program which can generate output as Course100?

 : You have been given below dataset
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 course102 ;
by COURSE_ID;
run;


4. data course100;
merge course101 course102 ;
by COURSE_ID;
run;


Correct Answer : Get Lastest Questions and Answer :
Explanation: Again you need to observe generated output in Course100
- Results are sequential, Hence By statement certainly used. Hence, option 1 is out.
- New dataset course100 contains all the variables from both course101 and course102
- All the observations are present from both the dataset.
All above is possible using interleaving, which requires a list of data set names in the SET statement and one or more BY variables in the BY statement.





Question : You have been given below dataset

You execute below program, which of the generated output is correct?
data course100;
set course101 course102;
run;


 : You have been given below dataset
1. Image1
2. Image2
3. Access Mostly Uused Products by 50000+ Subscribers
4. Image4

Correct Answer : Get Lastest Questions and Answer :
Explanation: As program and input dataset is given than it would be relatively easier for you to find the result.
- This is an example of concatenation where one dataset will be appended to another dataset.
- Output should contains all the rows from input datasets, hence option 3 and 4 is out.
- All the variables should be present from the input datasets. Hence, option 2 is out.





Question : You have been given below two datasets

And you have below program
data course100;
set course101 course102;
run;

What will be the value of the fee in 2nd observation when program executed?

 : You have been given below two datasets
1. 6500

2. Null

3. Access Mostly Uused Products by 50000+ Subscribers

4. 5000


Correct Answer : Get Lastest Questions and Answer :
Explanation: As you are applying concatenation operation using SET. As you can see forst data set does not have any value for the FEE
column. Hence it will not have any value for Fee for the first 4 observations.


Related Questions


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


Question :

Within the data set Employee.Temp, SalaryRate is a character variable and time is a numeric variable. What happens when the following program is run?

data work.temp;
set employee.temp;
Salary=salaryrate*time;
run;

 :
1. SAS converts the values of SalaryRate to numeric values. No message is written to the log.
2. SAS converts the values of SalaryRate to numeric values. A message is written to the log.
3. SAS converts the values of Time to character values. No message is written to the log.
4. SAS converts the values of Time to character values. A message is written to the log.



Question :

A typical value for the character variable Target is 999,999.
Which statement correctly converts the values of Target to numeric values when creating the variable TargetNo?
 :
1. TargetNo=input(target,comma6.);
2. TargetNo=input(target,comma7.);
3. TargetNo=put(target,comma6.);
4. TargetNo=put(target,comma7.)


Question :

A typical value for the numeric variable SiteNum is 12.3.
Which statement correctly converts the values of DeptNum to character values when creating the variable SiteAddress?
 :
1. SiteAddress=dept||'/'||input(deptnum,3.1);
2. SiteAddress=dept||'/'||input(deptnum,4.1);
3. SiteAddress=dept||'/'||put(deptnum,3.1);
4. SiteAddress=dept||'/'||put(deptnum,4.1);