Premium

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



Question :

62. The following SAS program is submitted:

proc report data=survey nowd;
column age choice1;
(insert DEFINE statement here)
define choice1/display;
run;
Which one of the following DEFINE statements completes the program and displays values of the variable Age in ascending order?


 :
1. define age/sort;
2. define age/order;
3. Access Mostly Uused Products by 50000+ Subscribers
4. define age/order by age;

Correct Answer : Get Lastest Questions and Answer :


Explanation: You use a DEFINE statement to describe how to order and use variables in your report. To specify Age as an order variable, you use the ORDER usage option in the DEFINE
statement. An order variable orders the detail rows in a report according to their formatted values. By default, the order is ascending.




Question :

Which one of the following statements is true when SAS encounters a data error?


 :
1. The execution phase is stopped, and a system abend occurs.
2. A missing value is assigned to the appropriate variable, and execution continues.
3. Access Mostly Uused Products by 50000+ Subscribers
4. A missing value is assigned to the appropriate variable, and execution stops at that point.

Correct Answer : Get Lastest Questions and Answer :

Explanation: Unlike syntax errors, invalid data errors do not cause SAS to stop processing a program. SAS handles invalid data errors by assigning a missing value to the appropriate
variable and writing a message to the SAS log.
[Data errors do not affect continue, just a few mistakes assignment is missing]





Question :

The following SAS program is submitted:

data test;
input country $8. date mmddyy10.;
cards;
Germany 12/31/2000France 01/32/2001;
run;

Which one of the following is the value of the variable _ERROR_ when the variable _N_ has a value of 2?



 :
1. 0
2. 1
3. Access Mostly Uused Products by 50000+ Subscribers
4. false


Correct Answer : Get Lastest Questions and Answer :

Explanation: _N_ and _ERROR_ are automatic variables that can be used for DATA step processing but that are not written to the output data set. _N_ counts the number of times that the DATA
step begins to execute, and _ERROR_ signals the occurrence of an error that is caused by the data during execution. A value of 0 indicates no error while a value of 1 indicates one
or more errors. In the program above, the value for date in the second observation is invalid.
Data Error 32 will cause _error_ = 1



Related Questions


Question : Which of the following is correct way to store formats in the permanent catalog?
 : Which of the following is correct way to store formats in the permanent catalog?
1. libname library '/folders/myfolders/hadoopexam';
proc format lib=library;
value location
1='Mumbai'
2='Pune'
3='Chennai';
run;


2. libname library '/folders/myfolders/hadoopexam';
format lib=library;
value location
1='Mumbai'
2='Pune'
3='Chennai';
run;


3. Access Mostly Uused Products by 50000+ Subscribers
proc format library;
value location
1='Mumbai'
2='Pune'
3='Chennai';
run;


4. libname library '/folders/myfolders/hadoopexam';
proc library;
value location
1='Mumbai'
2='Pune'
3='Chennai';
run;



Question :
The following SAS program is submitted:
data combine;
prefix='505';
middle='6465 `;
end='09090';
(insert statement here)
run;
Which statement successfully completes the program so that TOTAL has a value of 505-6465-
09090?

  :
1. total = cat('-', prefix, middle, end);
2. total = catx('-', prefix, middle, end);
3. Access Mostly Uused Products by 50000+ Subscribers
4. total = prefix!!'-'!! left(middle)!!'-'!! end;


Question :
The following SAS program is submitted:

(insert ODS statement here)

proc means data = sasuser.shoes;
where product in (`Sandal' , `Slipper' , `Boot');
run;

(insert ODS statement here)

Which ODS statements complete the program and send the report to an HTML file?

  :
1. ods html = `sales.html'; ods html close;
2. ods file = `sales.html'; ods file close;
3. Access Mostly Uused Products by 50000+ Subscribers
4. ods html file = `sales.html'; ods html close;


Question :
Given the raw data file AMOUNT:
----I---- 10---I----20---I----30
$1,234
The following SAS program is submitted:
data test;
infile `amount';
input@1 salary 6.;
if_error_then description = `Problems';
else description = `No Problems';
run;
What is the result?

  :
1. The value of the DESCRIPTION variable is No Probl.
2. The value of the DESCRIPTION variable is Problems.
3. Access Mostly Uused Products by 50000+ Subscribers
4. The value of the DESCRIPTION variable can not be determined.


Question :
The following SAS program is submitted:
data work.total;
set work.salary(keep = department wagerate);
by department;
if first.department
then payroll = 0;
payroll + wagerate;
if last.department
run;
The SAS data set WORK.SALARY, currently ordered by DEPARTMENT, contains 100 observations for
each of 5 departments.
What is the result?

  :
1. The WORK.TOTAL data set contains 5 observations.
2. The WORKTDTAL data set contains 100 observations.
3. Access Mostly Uused Products by 50000+ Subscribers
4. The program fails to execute due to errors.


Question :
The following SAS program is submitted;
data combine;
country = `Italy, Russia, ireland';
found = find(country, `i');
run;
What is the value of the variable FOUND in the output data set?

  :
1. 1
2. 12
3. Access Mostly Uused Products by 50000+ Subscribers
4. Russia