Premium

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



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


Correct Answer : Get Lastest Questions and Answer :
Explanation: It depends where you run this program. The missing quotation mark in the LABEL statement causes SAS to misinterpret the
statements in the program. When you submit the program, SAS is unable to resolve the PROC step, and a PROC PRINT running message appears at the top of
the active window.
But if you run in SAS studio, then SAS can interpret the quotation mark and program can run successfully without any error.





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.


Correct Answer : Get Lastest Questions and Answer :
Explanation: If SAS finds syntax error than SAS will not run that particular step in which syntax ERROR detected. At the same time error
message will be given in the log window. Also you can see some explanation about the error.




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


Correct Answer : Get Lastest Questions and Answer :
Explanation: Syntax error means, you have not written the code the way is expecting.


Related Questions


Question : You have been given below datasets (Fixed width)


Following output has been generated


Which of the following program can generate this output.

A.
data course2017;
input COURSE_ID 1-3 COURSE_NAME$ 5-20 LOCATION$ 22-30 FEE 32-35 DATE$ 36-47
DURATION 48-50;
TotalFee=(FEE*18/100)+FEE;
ENTIREFEE+TotalFee;

B.
data course2017;
input COURSE_ID 1-3 COURSE_NAME$ 5-20 LOCATION$ 22-30 FEE 32-35 DATE$ 36-47
DURATION 48-50;
TotalFee=FEE;
ENTIREFEE+TotalFee;

C.
data course2017;
input COURSE_ID 1-3 COURSE_NAME$ 5-20 LOCATION$ 22-30 FEE 32-35 DATE$ 36-47
DURATION 48-50;
TotalFee=FEE+1000;
ENTIREFEE+TotalFee;

D.
data course2017;
input COURSE_ID 1-3 COURSE_NAME$ 5-20 LOCATION$ 22-30 FEE 32-35 DATE$ 36-47
DURATION 48-50;
TotalFee=(FEE*18/100)+FEE;
ENTIREFEE=TotalFee;

 : You have been given below datasets (Fixed width)
1. A


2. B

3. Access Mostly Uused Products by 50000+ Subscribers

4. D



Question : You have been given below datasets (Fixed width)


Following output has been generated

A.

data course2017;
input COURSE_ID 1-3 COURSE_NAME$ 5-20 LOCATION$ 22-30 FEE 32-35 DATE$ 36-47
DURATION 48-50;
TotalFee=(FEE*18/100)+FEE;
RETAIN ENTIREFEE 100000;
ENTIREFEE+TotalFee;
if TotalFee gt 1000 AND TOTALFee le 6000 then FEETYPE='VERYLOW';

B.

data course2017;
input COURSE_ID 1-3 COURSE_NAME$ 5-20 LOCATION$ 22-30 FEE 32-35 DATE$ 36-47
DURATION 48-50;
TotalFee=(FEE*18/100)+FEE;
RETAIN ENTIREFEE 100000;
ENTIREFEE+TotalFee;
if TotalFee > 6000 AND TotalFee<=8000 then FEETYPE='LOW';
if TotalFee gt 1000 AND TOTALFee le 6000 then FEETYPE='VERYLOW';
if TotalFee>8000 then FEETYPE='MODERATE';

C.
data course2017;
input COURSE_ID 1-3 COURSE_NAME$ 5-20 LOCATION$ 22-30 FEE 32-35 DATE$ 36-47
DURATION 48-50;
TotalFee=(FEE*18/100)+FEE;
RETAIN ENTIREFEE 100000;
ENTIREFEE+TotalFee;
if TotalFee gt 1000 AND TOTALFee le 6000 then (FEETYPE='VERYLOW' OR FEETYPE='LOW');

D.
data course2017;
input COURSE_ID 1-3 COURSE_NAME$ 5-20 LOCATION$ 22-30 FEE 32-35 DATE$ 36-47
DURATION 48-50;
TotalFee=(FEE*18/100)+FEE;
RETAIN ENTIREFEE 100000;
ENTIREFEE+TotalFee;
if TotalFee gt 1000 AND TOTALFee le 6000 then FEETYPE='VERYLOW';
if TotalFee > 6000 AND TotalFee<=8000 then FEETYPE='LOW';
if TotalFee>8000 then FEETYPE='MODERATE';

 : You have been given below datasets (Fixed width)
1. A



2. B


3. Access Mostly Uused Products by 50000+ Subscribers



4. D





Question : You have been given below code
data course2017;
infile data;
input COURSE_ID 1-3 COURSE_NAME$ 5-20 LOCATION$ 22-30 FEE 32-35 DATE$ 36-47
DURATION 48-50;
Label FEE="Total Fee"
format amount dollar12.2;
run;

proc print data=course2017 label;
var COURSE_ID COURSE_NAME LOCATION FEE DATE DURATION TotalFee ENTIREFEE FEETYPE;
Label FEE="Total Course Fee"
format amount dollar10.;
run;

When above program is executed than which of the following statement is correct?

 : You have been given below code
1. It will use format and label as
Label FEE="Total Fee"
format amount dollar12.2;

2. It will use format and label as
Label FEE="Total Course Fee"
format amount dollar10.;

3. Access Mostly Uused Products by 50000+ Subscribers

4. It will not be printed in output and generate error.



Question : You have been given below code
if course_fee>=4000
and (COURSE_NAME='HADOOP' or (COURSE_NAME='SPARK' and STUDENTS=24))
then LOCATION='MUMBAI';

Which of the expression will be executed first?

 : You have been given below code
1. if course_fee>=4000

2. (COURSE_NAME='SPARK' and STUDENTS=24)

3. Access Mostly Uused Products by 50000+ Subscribers

4. Can not be predicted and will be optimized by SAS engine



Question : You have been given below values in a variable name TotalFee
5000
.
7000
Once you execute below statement, what would be the ENTIREFEE values at end of execution
ENTIREFEE+TotalFee

 : You have been given below values in a variable name TotalFee
1. Missing

2. Null

3. Access Mostly Uused Products by 50000+ Subscribers

4. 22000

5. 22



Question : You have been given below values in a variable name TotalFee
5000
.
7000
Once you execute below statement, what would be the ENTIREFEE values at end of execution
RETAIN ENTIREFEE 5000;
ENTIREFEE+TotalFee;

When you are at the 4th observation than what would be the value of ENTIREFEE

 : You have been given below values in a variable name TotalFee
1. 0

2. Null

3. Access Mostly Uused Products by 50000+ Subscribers

4. 22000

5. 17000