Premium

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



Question : Within the data set Furnitur.Bookcase, the variable Finish contains values such as ash/cherry/teak/matte-black.
Which of the following creates a subset of the data in which the values of Finish contain the string walnut? Make the search for the string case-insensitive.
 : Within the data set Furnitur.Bookcase, the variable Finish contains values such as ash/cherry/teak/matte-black.
1. data work.bookcase;
set furnitur.bookcase;
if index(finish,walnut) = 0;
run;
2. data work.bookcase;
set furnitur.bookcase;
if index(finish,'walnut') > 0;
run;
3. Access Mostly Uused Products by 50000+ Subscribers
set furnitur.bookcase;
if index(lowcase(finish),walnut) = 0;
run;
4. data work.bookcase;
set furnitur.bookcase;
if index(lowcase(finish),'walnut') > 0;
run;

Correct Answer : Get Lastest Questions and Answer :

Use the INDEX function in a subsetting IF statement, enclosing the character string in quotation marks. Only those observations in which the function locates the string and returns a
value greater than 0 are written to the data set.





Question : You have been given a library named HETRAIN, now you need to find the summary of all the files stored in this SAS library, which of the
following option will be best suitable.

 : You have been given a library named HETRAIN, now you need to find the summary of all the files stored in this SAS library, which of the
1. proc contents data=HETRAIN._all_ nods;

2. proc contents data=HETRAIN _all_ nods;

3. Access Mostly Uused Products by 50000+ Subscribers

4. proc contents data=HETRAIN _all_.nods;


Correct Answer : Get Lastest Questions and Answer :
Explanation: There are two proc by which you can get the summary of data stored in a SAS library.
- Contents
- Datasets
As option is asking for the Contents proc. So see the options available with the contents proc.
In this case we have to have _All_ option appended with the library name using dot. And to suppress all the information for files, you have to use nods
option separated by space.





Question : Which of the following is a correct syntax with regards to referencing a file stored in a SAS permanent library?

 : Which of the following is a correct syntax with regards to referencing a file stored in a SAS permanent library?
1. data hadoopexam.subs;
set courses.subscriber;
if price>100;
run;



2. data 2hadoop.subs;
set courses.subscriber;
if price>100;
run;


3. Access Mostly Uused Products by 50000+ Subscribers
set courses.subscriber;
if price>100;
run;


4. data subs;
set courses.subscriber;
if price>100;
run;


Correct Answer : Get Lastest Questions and Answer :
Explanation: You need to look for the naming rules of a SAS library at first. It can not be longe than 8 character. Hence, option 1 is out.
It can not start with the number, hence option 2 is out. To reference a file in a permanent library you have to have two level access, hence option 4 is
out. Only option 3 is left and which is correct.


Related Questions


Question : Is there anything wrong with the below program
data HADOOPEXAM ;
infile "/folders/myfolders/hedata/filtered1.dat"
input COURSE_ID 1-3 COURSE_NAME$ 5-20 LOCATION$ 22-30 FEE 32-35 DATE$ 36-47
DURATION 48-50;
Total_FEE=FEE+FEE*18/100;
run;

 : Is there anything wrong with the below program
1. You must put semicolon on each line. Semicolon missing on line 2 and 3

2. Semicolon is required in line 3 only

3. Access Mostly Uused Products by 50000+ Subscribers

4. You must put semicolon in line 2



Question : You can see following log is printed after execution of SAS program.
NOTE: Invalid data for COURSEID in line 7 15-19.
RULE: ----+----1----+----2----+----3----+----47
MUMBAI SPARK 3 5000
LOCATION=MUMBAI COURSEID=. COURSE_NAME=SPARK FEE=5000
Total=100 _ERROR_=1 _N_=1

What can you interpret from this?

 : You can see following log is printed after execution of SAS program.
1. There is a Syntax error and you have not used SAS keywords correctly.

2. All the columns are not kept in the correct order

3. Access Mostly Uused Products by 50000+ Subscribers

4. A dollar sign was missing in the INPUT statement.



Question : You have defined a SAS format as below.
proc format ;
value location
1='Mumbai'
2='Pune'
3='Chennai';
Run;
How long this format will be available?

 : You have defined a SAS format as below.
1. For the new PROC and DATA step only

2. For Next DATA step only.

3. Access Mostly Uused Products by 50000+ Subscribers

4. It will be available permanently



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;