Premium

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



Question :

The following SAS program is submitted:
data work.test;
Title = 'A Tale of Two Cities, Charles J. Dickens';
Word = scan(title,3,' ,');
run;
Which one of the following is the value of the variable WORD in the output data set?

 :
1. T
2. of
3. Access Mostly Uused Products by 50000+ Subscribers
4. ' ' (missing character value)

Correct Answer : Get Lastest Questions and Answer :

Explanation: the placement of the quotations around the delimiter, the comma, is critical - if there were NO space (','), the value returned would be ' ' (missing character value). However,
having the space before the delimiter (' ,') returns the 'of', so it is 'B'






Question :

The following SAS program is submitted:
data work.test;
First = 'Ipswich, England';
City_Country = substr(First,1,7)!!', '!!'England';
run;
Which one of the following is the length of the variable CITY_COUNTRY in the output data set?


 :
1. 6
2. 7
3. Access Mostly Uused Products by 50000+ Subscribers
4. 25

Correct Answer : Get Lastest Questions and Answer :

Explanation: By default the variable length is determined by the length of the first argument for substr.

So here we have 16 + 2(', ') + 7('England') = 25
In SAS programming, the concatenation operator is a pair of vertical bars (||). If your keyboard does not have a solid vertical bar, use two broken vertical bars (||) or two
exclamation points (!!).

The length of the new variable is the sum of the lengths of the pieces or number of characters that is specified in a LENGTH statement for the new variable."

(ref - Sas help and documentation)

Answer is 25 because :
length of First = 16
length of ', ' = 2
length of 'England' = 7

Total length = 25. Thus Answer = 4







Question :
The following SAS program is submitted:
data work.test;
First = 'Ipswich, England';
City = substr(First,1,7);
City_Country = City!!', '!!'England';
run;
Which one of the following is the value of the variable CITY_COUNTRY in the output data set?


 :
1. Ipswich!!
2. Ipswich, England
3. Access Mostly Uused Products by 50000+ Subscribers
4. Ipswich , England

Correct Answer : Get Lastest Questions and Answer :

Explanation: Because is there is no trim, there is extra space for city. so answer is D. If you run in SAS, there is definitely an extra blank after Ipswich before the comma; by POE, it
would be D. Ipswich________, England . TRIM function is used to remove the embedded blanks from the resulting variable.




Related Questions


Question : Following output can be generated using which of the following procedure


A. proc means data=course2017 ;
class course_name;
run;

B. proc summary data=course2017 print ;
class course_name;
run;

C. proc means data=course2017 noprint ;
class course_name;
run;

D. proc summary data=course2017 noprint;
class course_name;
run;

 : Following output can be generated using which of the following procedure
1. A,B
2. B,C
3. Access Mostly Uused Products by 50000+ Subscribers
4. A,D
5. B,D


Question : You have been given a SAS data set with the name of HESAMPLE which contains various columns including Numeric and character, when you use
this data set in FREQ proc which of the statement will be true?

 : You have been given a SAS data set with the name of HESAMPLE which contains various columns including Numeric and character, when you use
1. It will generate freq only for numeric values

2. It will generate freq only for character variables

3. Access Mostly Uused Products by 50000+ Subscribers

4. By default it will not generate freq for any variable/



Question : You have been asked to apply frequency analysis of some data, now you need to select the variables which is best fit for frequency analysis
which variable you will be choosing.

 : You have been asked to apply frequency analysis of some data, now you need to select the variables which is best fit for frequency analysis
1. Numerical Value column only

2. Column which has unique value only

3. Access Mostly Uused Products by 50000+ Subscribers

4. Column which has Categorical values



Question : Which of the given procedure can generate below output

 : Which of the given procedure can generate below output
1. proc freq data=course2017 ;
TABLES COURSE_NAME*FEE ;
run;

2. proc freq data=course2017 ;
VAR COURSE_NAME*FEE ;
run;

3. Access Mostly Uused Products by 50000+ Subscribers
CLASS COURSE_NAME*FEE ;
run;

4. proc freq data=course2017 ;
BY COURSE_NAME*FEE ;
run;



Question : Which of the following procedure will generate given output?

 : Which of the following procedure will generate given output?
1. proc freq data=course2017 ;
TABLES COURSE_NAME*FEE nofreq norow nocol; ;
run;

2. proc freq data=course2017 ;
TABLES COURSE_NAME*FEE LIST nofreq norow nocol; ;
run;

3. Access Mostly Uused Products by 50000+ Subscribers
TABLES COURSE_NAME*FEE / nocol; ;
run;

4. proc freq data=course2017 ;
TABLES COURSE_NAME*FEE / nofreq norow nocol; ;
run;



Question : You have been asked to create a report in various formats. You have started to write SAS program to generate the reports. How many types of
output you can generate using ODS statement?

 : You have been asked to create a report in various formats. You have started to write SAS program to generate the reports. How many types of
1. 1

2. 2

3. Access Mostly Uused Products by 50000+ Subscribers

4. As such there is no limit