Premium

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



Question : If you have been given below condition

if header='C' then input course_name $;
else if header='LF' then location $ FEE ;

which of the following statements are correct?

  : If you have been given below condition
1. If header is not C then location and Fee value will be read from data

2. If header is not C then course name value will be read from data

3. Access Mostly Uused Products by 50000+ Subscribers

4. If header is C then another condition will be checked


Correct Answer : Get Lastest Questions and Answer :
Explanation: Here we need to understand if then else condition. If first condition header=C is true than course_name will be initialized.
If condition is not true than else block will be executed where , another condition is present header=LF, if this condition is true than only location
and fee will be initialized else not.




Question : You have been given below code, what that means

if header='C' then
do;

if _N_ >1 then
output;
TOTAL_LOCATIONS=0;
input course_name $;
end;

A. _N_ value tells how many detail record have been read or time data steps is executed.
B. If header=C and _N_ >1 then generate the output
C. If header=C or _N_ >1 then generate the output
D. Observation is generated only for the header record and no detail record will be read

 : You have been given below code, what that means
1. A,B
2. B,C
3. Access Mostly Uused Products by 50000+ Subscribers
4. A,D
5. B,D

Correct Answer : Get Lastest Questions and Answer :
Explanation: As you know _N_ is an automatic variable, hence for each data step execution its value will be incremented by 1. Similarly for
each as soon as header value is ك it will check for another condition _N_>1 if this both the conditions are true than only output will be generated
else not.




Question : You have been given below dataset and SAS program, how many observation will be generated at the end of the program



filename course73 '/folders/myfolders/hedata/course73.txt';

data data73;
infile course73 missover;
input course_name $ @;
do sequnce=1 to 4;
input location $ Fee @;
output;
end;
run;

proc print data=data73;
run;

 : You have been given below dataset and SAS program, how many observation will be generated at the end of the program
1. 17

2. 20

3. Access Mostly Uused Products by 50000+ Subscribers

4. None


Correct Answer : Get Lastest Questions and Answer :
Explanation: As you can see there are on average 4 observation in each raw record. However, record 3 has only 1, which make total
observation to 17 . But we are using option missover which generate empty values for missing observation. Hence, total generated observation in output
are 20 only


Related Questions


Question : You have been given below file which has multiple observations in single record


You want to produce result such that
Course_name -> course_date course_fee

So that you decided to use @@ double trailing sign, which of the following statement is true for that?

A. You will have to read multiple input statement for single raw record across multiple iteration of the data steps than you will use it.
B. You should put it at the end of input statement
C. You should put it at the beginning of input statement
D. Hold on the line will be released if pointer moves past of the record

 : You have been given below file which has multiple observations in single record
1. A,B,C
2. B,C,D
3. Access Mostly Uused Products by 50000+ Subscribers
4. A,B,D


Question : You have been given below dataset


And you will be using single @ sign to read this data, which statement is true regarding that?

 : You have been given below dataset
1. Record which is hold by trailing @ sign will be released once end of the record is reached.

2. Record which is hold by trailing @ sign will be released once data step next iteration begins.

3. Access Mostly Uused Products by 50000+ Subscribers

4. It will never release hold on the record automatically, you have to explicitly mark using @@ sign.



Question : You have been given below dataset


Each raw record has 3 observation, which of the following program can read it perfectly?

 : You have been given below dataset
1. input course_name $ course_date mmddyy8. course_fee @@;

2. input course_name $ course_date mmddyy8. course_fee @;

3. Access Mostly Uused Products by 50000+ Subscribers

4. @ input course_name $ course_date mmddyy8. course_fee @;



Question : You want to write a loop where as soon as variable is read needs to be written in output which of the following program snippet is correct?

 : You want to write a loop where as soon as variable is read needs to be written in output which of the following program snippet is correct?
1. Do counter=1 to 10;
Input hecoursefee : comman9. @;
Output;
End; run;


2. Do counter=1 to 10;
Input hecoursefee : comman9. @;
End; Output;
run;



3. Access Mostly Uused Products by 50000+ Subscribers
Input hecoursefee : comman9. @;
Output;
End; run; Output;



4. Do counter=1 to 10;
Input hecoursefee : comman9. @;
End; run;



Question : You have below raw data file which contains cours_name location fee and then location and corresponding fee upto times in each record.
Which of the following program can read this file and create 20 observation is SAS data set. Also each observation has course_name, location and fee as
show below.

A.
filename course72 '/folders/myfolders/hedata/course72.txt';
data data72;
infile course72;
input course_name $ @;
input location $ Fee @;
output;
input location $ Fee @;
output;
input location $ Fee @;
output;
input location $ Fee @;
output;
run;

B.
filename course72 '/folders/myfolders/hedata/course72.txt';
data data72;
infile course72;
input course_name $ @;
output;
run;

C.
filename course72 '/folders/myfolders/hedata/course72.txt';
do sequence=1 to 3;
infile course72;
input course_name $ @;
input location $ Fee @;
output;
input location $ Fee @;
output;
input location $ Fee @;
output;
input location $ Fee @;
output;
end;
run;

D.
filename course72 '/folders/myfolders/hedata/course72.txt';
data data72;
infile course72;
input course_name $ @@;
output;
run;

 : You have below raw data file which contains cours_name location fee and then location and corresponding fee upto  times in each record.
1. A



2. B


3. Access Mostly Uused Products by 50000+ Subscribers


4. D


Question : When you read data sequentially which of the following file will create problem ?


 : When you read data sequentially which of the following file will create problem ?
1. A
2. B
3. Access Mostly Uused Products by 50000+ Subscribers
4. D