Premium

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



Question : You have been working following SAS files, you need to find which of the following a permanent file is?


 : You have been working following SAS files, you need to find which of the following a permanent file is?
1. SASHELP.PrdSale

2. SASUSER.HESALES

3. SUBSCRIBER.COURSES

4. All of the above


Correct Answer : 4
Explanation: If you miss or do not provide the libref than all the files will go in temporary library called Work. However, in all three
option 1, 2 and 3, it had been provided with the valid library name other than work hence all will be stored permanently.
Libref.filename is the syntax.
If you have reference like below than it will be temporary
- Work.hadoopexam
- Hadoopexam





Question : You have been working with the HadoopExam subscriber data. You need to work on some temporary data for the all the subscriber in last one
year and named as HESUBSCRIBER. How can you reference a temporary SAS data set named HESUBSCRIBER?
A. HESUBSCRIBER
B. Work. HESUBSCRIBER
C. HE. HESUBSCRIBER
D. HE.SUBSCRIBER

 : You have been working with the HadoopExam subscriber data. You need to work on some temporary data for the all the subscriber in last one
1. A,B
2. B,C
3. C,D
4. A,D
5. B,D

Correct Answer : 1
Explanation: As you know all the temporary data stored in Work library and they can be reverenced either using Work libref or without any
libref. Hence option A and B are correct.




Question : You have been given below SAS dataset

What is the default length of the variable fee?

 : You have been given below SAS dataset
1. 5

2. 6

3. 7

4. 8

5. Looking at sample data, we cannot default length.


Correct Answer : 4
Explanation: For numeric data default length will always be 8 bytes. However, you can change it if you want it. As question is asking for
default length which will be 8 only.


Related Questions


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);


Question : Suppose the YEARCUTOFF= system option is set to . Which MDY function creates the date value for January , ?

 :  Suppose the YEARCUTOFF= system option is set to . Which MDY function creates the date value for January , ?
1. MDY(1,5,14)
2. MDY(5,1,14)
3. MDY(1,5,2014)
4. MDY(5,1,2014)



Question : The variable Address contains values such as Newdelhidl, DL. How do you assign the two-letter state abbreviations to a new variable named Capital?
 :  The variable Address contains values such as Newdelhidl, DL. How do you assign the two-letter state abbreviations to a new variable named Capital?
1. Capital=scan(address2,2);
2. Capital=scan(address2,13,2);
3. Capital=substr(address2,2);
4. Capital=substr(address2,13,2);


Question : The variable EmpCode contains values such as FL and MX.
The fourth character identifies sex. How do you assign these character codes to a new variable named MaleORFemale?
 :  The variable EmpCode contains values such as FL and MX.
1. MaleORFemale=scan(empcode,4);
2. MaleORFemale=scan(empcode,4,1);
3. MaleORFemale=substr(empcode,4);
4. MaleORFemale=substr(empcode,4,1);