Premium

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



Question : You have been given below dataset


Which of the style you will use to read the data?

 : You have been given below dataset
1. Column

2. Formatted

3. Access Mostly Uused Products by 50000+ Subscribers

4. Mixed


Correct Answer : Get Lastest Questions and Answer :
Explanation: As you can see data is separated by the blank space consistently. Hence we can use list input to read this data.




Question : You have been given below dataset named data.

And you need to generate data as below in a file called gen_course43.txt which of the following code segment is correct?

A.
data gen_course43.txt;
set data41;
file ' data41 dsd;
put course_name FEE1: comma7. FEE2 : comma7. FEE3: comma7. FEE4 : comma7.;
run;

B.
data _null_;
set data41;
file '/folders/myfolders/hedata/gen_course43.txt' dsd;
put course_name FEE1: comma7. FEE2 : comma7. FEE3: comma7. FEE4 : comma7.;
run;

C.
data _null_;
set data41;
file '/folders/myfolders/hedata/gen_course43.txt';
put course_name FEE1: comma7. FEE2 : comma7. FEE3: comma7. FEE4 : comma7.;
run;

D.
data _null_;
set data41;
file '/folders/myfolders/hedata/gen_course43.txt' dlm=;
put course_name FEE1: comma7. FEE2 : comma7. FEE3: comma7. FEE4 : comma7.;
run;

 : You have been given below dataset named data.
1. A



2. B



3. Access Mostly Uused Products by 50000+ Subscribers




4. D



Correct Answer : Get Lastest Questions and Answer :
Explanation: As given dataset, we can clearly see that we need to read data from data41. Hence, it should be part of set statement, as well
as we are not generating new dataset, we need to generate file. Hence data step should be line _null_ , hence option 1 is out. Now we need to read data
and needs to be generated comma separated vaues. However, all the values which has comma as part of their values than we have to use dsd option, which
will make sure that data values will be separated by comma and any values format which has comma in the values will be generated on double quote. So
option 2 is correct.




Question : You have been given below raw data



You need to read it correctly which of the following code fragment is correct

 : You have been given below raw  data
1.
filename course35 '/folders/myfolders/hedata/course35.txt';
data data35;
length course_name $ 16;
infile course35 ;
input course_name $ (Fee1-Fee4 ) (comma7.);


2.
filename course35 '/folders/myfolders/hedata/course35.txt';
data data35;
length course_name $ 16;
infile course35 ;
input course_name Fee1 : comma7. FEE2 : comma7. FEE3 : comma7. FEE4 : comma7. ;


3. Access Mostly Uused Products by 50000+ Subscribers
filename course35 '/folders/myfolders/hedata/course35.txt';
data data35;
infile course35 ;
input course_name 16. (Fee1-Fee4 ) (comma7.);


4.
filename course35 '/folders/myfolders/hedata/course35.txt';
data data35;
infile course35 dlm=-;
input course_name $ (Fee1-Fee4 ) (comma7.);



Correct Answer : Get Lastest Questions and Answer :
Explanation: As you can see in the raw data values are not fixed column. Hence, you cannot use column format. You can read blank space
separated value using list input. However, for similar field you can use range like fee1-fee4. However, you need to provide format as well for these
values. Hence both fields and format should be in parenthesis. As character by default will be 16 character. So based on all this requirement we can say
option 1 is correct.


Related Questions


Question : You have been looking a SAS program written by your team mate. However, he has not done formatting of the code.
He has used Proc print , to display data in the output window.
Below is the code, which is written by your team mate. Please find the total number of statement in this code.

proc print data=EmployeeInfo
label double;
var name age salary bonus; where sex='male';
label sex='SEX'; run;

 : You have been looking a SAS program written by your team mate. However, he has not done formatting of the code.
1. three
2. four
3. Access Mostly Uused Products by 50000+ Subscribers
4. six


Question : You have been given below SAS programming statement
Libname Hadoop spss c:\hadoopexam\courses.spss;

 : You have been given below SAS programming statement
1. Above statement is having wrong syntax or half.

2. Above statement is defining two libref pointing to the same data file

3. Access Mostly Uused Products by 50000+ Subscribers

4. It is defining a library named spss using Hadoop sas engine



Question : You are a good SAS programmer, hence whenever you write a program you will follow which of the following
A. Whenever you write a DATA or PROC step, you will always start it with the first column
B. Whatever statements you write inside the step, you should indent it properly.
C. You always write RUN statement as a first column
D. You should prefer multiple statement in single line, separated by semicolon
E. You always assign a new label to column when output generated

 : You are a good SAS programmer, hence whenever you write a program you will follow which of the following
1. A,B,C
2. B,C,D
3. Access Mostly Uused Products by 50000+ Subscribers
4. A,D,E
5. A,C,E


Question : When you run the below program what will happen (SAS windows environment)
data work.prices;
infile '/folders/myfolders/hadoopexam/hesample1.dat';
input CODE $ NAME$ FEE1 FEE2;
if NAME='SPARK;
run;

proc print data= work.prices ;
run;

 : When you run the below program what will happen (SAS windows environment)
1. Program will run successfully

2. An error message will be printed

3. Access Mostly Uused Products by 50000+ Subscribers
become too long or that the statement is ambiguous.

4. None of the above



Question : You are reviewing the SAS code written by a one of the junior programmer in your team. However, there seems to be a syntax error. What
happens when you run a program with a Syntax error?

 : You are reviewing the SAS code written by a one of the junior programmer in your team. However, there seems to be a syntax error. What
1. Syntax error will be auto corrected by the SAS and program will gracefully completed

2. Log window will tell you the syntax error, however program will finishes successfully

3. Access Mostly Uused Products by 50000+ Subscribers

4. In a step where syntax error, SAS will not run that particular step and you can see the error in output window.

5. In a step where syntax error, SAS will not run tell you where the error is.



Question : One of your junior programmer is running SAS program and he is complaining that there is a syntax error in the SAS code, what do you
interpret?

 : One of your junior programmer is running SAS program and he is complaining that there is a syntax error in the SAS code, what do you
1. Given data is not in expected format

2. SAS statement is not having valid keyword

3. Access Mostly Uused Products by 50000+ Subscribers

4. Any of the above