Premium

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



Question : As you know, SAS Data step is executed in two phase compilation and execution phase. During each phase some variables values are assigned
or created. Which of the following will not be created in compilation phase?

 : As you know, SAS Data step is executed in two phase compilation and execution phase. During each phase some variables values are assigned
1. Descriptor of the dataset

2. First observation will be created in compilation phase

3. Access Mostly Uused Products by 50000+ Subscribers

4. _N_ automatic variable will be created

5. _ERROR_ automatic variable will be created


Correct Answer : Get Lastest Questions and Answer :
Explanation: All the variables are created during the compilation phase and will not be assigned values until the execution phase.
Input Buffer: It is created only when data read from a RAW file, if data read from SAS dataset then it will be read into PDV directly.
Program Data Vector: Once input buffer is created, now PDV will be created. PDV is again logical area in the Memory and SAS build it data sets in it
observation by observation. There are automatic variables are also created in this phase.
- _N_ : Counts the number of times data steps is being iterated.
- _ERROR_ : If any error occurs during the data read, 1 will be set else remain 0.
Descriptor Portion: It is a description of the data, which can have below information.
- Name of the data set and its member type.
- Date and time when the data set was created.
- Name, Data types(Numeric or character) and length of the variable.
Extended Attribute: This is also the part of descriptor portion and its key, values. When you use CONTENTS PROC, you can see the descriptor portion of
the data.
During the compilation phase, no data will be created in SAS data set.
First Observation: This will be created during the execution phase only, when raw file will be read.





Question : You have written a SAS program, one of your colleague told you that this program will not be compiled successfully, it has compilation
error, and what does he mean?
A. Values provided in if condition are wrong.
B. Values provided in where clause are wrong.
C. You have used one of the options in the DATA step, which is not valid
D. You have missed the semicolon at the end of statement
E. You have used the SAS keywords which are misspelled

 : You have written a SAS program, one of your colleague told you that this program will not be compiled successfully, it has compilation
1. A,B,C
2. B,C,D
3. Access Mostly Uused Products by 50000+ Subscribers
4. A,D,E
5. A,C,E

Correct Answer : Get Lastest Questions and Answer :
Explanation: When SAS compile the data steps, it does not look into the value part of any statement, it only look for syntax error. Which
can be you have wrongly used the option in SAS statement, or you misspelled the SAS keyword or forgot to put semicolon in the statement.
Syntax Checking: During the compilation each SAS statement from DATA step will be checked for syntax error.
- Missing or misspelled keywords
- Invalid variable names
- Missing or invalid punctuation
- Invalid option






Question : You have been running a DATA step on a raw file which contain records in it, while execution phase how many time DATA step will be
executed


 : You have been running a DATA step on a raw file which contain  records in it, while execution phase how many time DATA step will be
1. Only once for entire file

2. It cannot be predicted, because it depend on the file size and what is the input buffer size is configured.

3. Access Mostly Uused Products by 50000+ Subscribers

4. It can be 50 times , if buffer is configured with 1 MB


Correct Answer : Get Lastest Questions and Answer :
Explanation: In the execution phase, DATA step will be executed 1 time for each observation in a raw file.
- Execution phase: Data Portion will be created in this phase. It follows the following step will be followed.
o _N_ variable: Each time DATA step is executed, _N_ variables will increment by 1.
o PDV : Any newly created variable will be set to missing in Program DATA Vector(PDV)
o Now it will read an observation in either input buffer or directly into PDV.
o Now remaining statements from the SAS program will be executed and PDV will be updated accordingly.
o At the last statement of DATA step, entire observation will be written to SAS Data set. Only variables which are in SET, MERGE, MODIFY, or UPDATE
statement will not be reset as missing in PDV.
o Similarly for another observation above steps will be followed, until all the observations are done.
o As soon end of file found for the raw data, it will terminate SAS data steps.



Related Questions


Question :

The following SAS program is submitted:
data work.one;
x = 3;
y = 2;
z = x ** y;
run;
Which one of the following is the value of the variable Z in the output data set?


  :
1. 6
2. 9
3. Access Mostly Uused Products by 50000+ Subscribers
4. The program fails to execute due to errors.


Question : The SAS data set named WORK.TEST is listed below:
capacity airplanetype staff
150 Large 10

Which one of the following SAS programs created this data set?
A. data work.test;
capacity = 150;
if 100 le capacity le 200 then
airplanetype = 'Large' and staff = 10;
else airplanetype = 'Small' and staff = 5; run;

B. data work.test;
capacity = 150;
if 100 le capacity le 200 then
do;
airplanetype = 'Large';
staff = 10;
end;
else
do;
airplanetype = 'Small';
staff = 5; end; run;

C. data work.test;
capacity = 150;
if 100 le capacity le 200 then
do;
airplanetype = 'Large';
staff = 10;
else
do;
airplanetype = 'Small';
staff = 5; end; run;

D. data work.test;
capacity = 150;
if 100 le capacity le 200 then;
airplanetype = 'Small';
staff = 5;
else;
airplanetype = 'Large'; staff = 10; run;



  : The SAS data set named WORK.TEST is listed below:
1. a
2. b
3. Access Mostly Uused Products by 50000+ Subscribers
4. d



Question :

The SAS data sets WORK.EMPLOYEE and WORK.SALARY are listed below:
WORK.EMPLOYEE WORK.SALARY
fname age fname salary
Bruce 30 Bruce 25000
Dan 40 Bruce 35000
Dan 25000
The following SAS program is submitted:
data work.empdata;
merge work.employee
work.salary;
by fname;
totsal + salary;
run;
How many variables are output to the WORK.EMPDATA data set?


  :
1. 3
2. 4
3. Access Mostly Uused Products by 50000+ Subscribers
4. No variables are output to the data set as the program fails to execute due to errors.



Question :

The contents of two SAS data sets named EMPLOYEE and SALARY
are listed below. How many observation are in EMPLSAL dataset

data emplsal;
merge employee (in=ine) salary(in=ins);
by name;
if ine and ins;
run;
Choices are



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



Question :
Which of the following will occur when an EC2 instance in a VPC (Virtual Private Cloud) with an associated Elastic IP is stopped and started?

  :
1. The Elastic IP will be dissociated from the instance
2. All data on instance-store devices will be lost
3. Access Mostly Uused Products by 50000+ Subscribers
4. The underlying host for the instance is changed


Question :

The following SAS program is submitted:
data numrecords;
infile 'file-specification';
input @1 patient $15.
relative $ 16-26 @;
if relative = 'children' then
input @54 diagnosis $15. @;
else if relative = 'parents' then
input @28 doctor $15.
clinic $ 44-53
@54 diagnosis $15. @;
input age;
run;
How many raw data records are read during each iteration of the DATA step during execution?


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