Premium

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



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;


Correct Answer : Get Lastest Questions and Answer :
Explanation: Whenever you want data as soon as read needs to be put in output than you should use explicitly an output statement like in
option 1, putting outside the loop is of no use as option 2. And after putting run statement is syntactically wrong. And option 4 you have not used any
output statement so it is also wrong.




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

Correct Answer : Get Lastest Questions and Answer :
Explanation: You can read this data using trailing @ sign, for each input step. Option 4 is out. Now if we see the data there are 4
observation in each raw record, so we can use loop or explicitly 4 input step. Hence, option 2 is also out, it does not use any loop or 4 time input
step. Option 3 is also wrong it uses 3 time loop as well as 4 explicate input step and not correct. Now lets move to option A, which is not using any
loop but explicit 4 input step. It read course_name and hold it until next iteration of data step, it means course_name will be read like SAS hold it,
next read its location and fee like Mumbai and 4999 and output statement will submit this data, and next input statement will override the location and
fee again like Chennai and 3999 but hold the course_name and output it. Until entire record is finished 4 times for a raw record, it will read the
data. And as soon as data step finished course_name will be released.




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

Correct Answer : Get Lastest Questions and Answer :
Explanation: Lets observe data one by one

Option A: Every three records can make correct observations. Hence, there will be 2 observations.

Option B: Every 4 records can create proper observation, hence there will be 2 observations can be created out of 8 raw records.

Option C: Again every three records can create proper observations. So 2 observation will be created.

Option D: We can try to create proper observation using every two records. However, when we see every even number of record #2 , then each has 2 fields
other than record number 6 which has only 1 record. SO based on that we can say that option D cannot be correctly read.



Related Questions


Question :
The following SAS program is submitted:

What is the value of the second variable in the data set WORK.AUTHORS?
  :
1. Hemingway
2. Hemingwa
3. Access Mostly Uused Products by 50000+ Subscribers
4. The program contains errors. No variables are created.


Question : You have set YEARCUTOFF= (which is default as well). Now you have date as //. How this date will be read by SAS, when you have
specified the format as MMDDYY8.?

  : You have set YEARCUTOFF= (which is default as well). Now you have date as //. How this date will be read by SAS, when you have
1. 13-Aug-2025

2. 13-Aug-1925

3. Access Mostly Uused Products by 50000+ Subscribers

4. 13-Aug-1920



Question : You have been given below SAS data in raw file


Where second and third field of the date will give you startDate and endDate of training course, which of the following will give you the correct value
for course duration?

 : You have been given below SAS data in raw file
1. endDate-startDate

2. endDate-startDate+1

3. Access Mostly Uused Products by 50000+ Subscribers

4. startDate-endDate

5. (startDate-endDate)*24



Question : You have been given below dataset



Where every 4th record has course id and you want to read it first, which of the following can help you for this?

 : You have been given below dataset
1. Column pointer control

2. Line pointer control

3. Access Mostly Uused Products by 50000+ Subscribers

4. Line position control



Question : You have been given below dataset, which contains lines. However, you want to read it in observation, where each observation will have
3 records from raw file.



Which of the following can help for this requirement?

  : You have been given below dataset, which contains  lines. However, you want to read it in  observation, where each observation will have
1. @n

2. /

3. Access Mostly Uused Products by 50000+ Subscribers

4. I++



Question : You have been given below dataset, which contain observation in line.

You want to read the observation like this 4th line first and then 1, 2, 3 line. Which of the following can help you to read raw data using absolute
line number?

  : You have been given below dataset, which contain  observation in  line.
1. @n

2. @

3. Access Mostly Uused Products by 50000+ Subscribers

4. \