Premium

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



Question :

The SASDATA.BANKS data set has five observations when the following SAS program is submitted:
libname sasdata 'SAS-data-library';
data allobs;
set sasdata.banks;
capital=0;
do year = 2000 to 2020 by 5;
capital + ((capital+2000) * rate);
output;
end;
run;
How many observations will the ALLOBS data set contain?

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

Correct Answer : Get Lastest Questions and Answer :

Exp: year=2000 to 2020 by 5
(includes the 2020 also, so 5 iterations)

5 observations 5 iterations

the output statement is inside the do loop, an observation will be created each time through the loop, so 5 observations, 5 loops, 25 observations total.





Question :

The SAS data set named COMPANY.PRICES is listed below:
COMPANY.PRICES
prodid price producttype sales returns
K12S 5.10 NETWORK 15 2
B132S 2.34 HARDWARE 300 10
R18KY2 1.29 SOFTWARE 25 5
3KL8BY 6.37 HARDWARE 125 15
DY65DW 5.60 HARDWARE 45 5
DGTY23 4.55 HARDWARE 67 2
The following SAS program is submitted:
libname company 'SAS-data-library';
data hware inter soft;
set company.prices (keep = producttype price);
if price le 5.00;
if producttype = 'HARDWARE' then output HWARE;
else if producttype = 'NETWORK' then output INTER;
else if producttype = 'SOFTWARE' then output SOFT;
run;
How many observations does the HWARE data set contain?

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

Correct Answer : Get Lastest Questions and Answer :

Exp: Following three observation satisfy condition if price le 5.
B132S 2.34 HARDWARE 300 10
R18KY2 1.29 SOFTWARE 25 5
DGTY23 4.55 HARDWARE 67 2
Out of the above 3 observation only 2 observation have producttype = 'HARDWARE', so number of observation in HWARE is 2, hence answer is 2






Question :

The following SAS program is submitted:
data allobs;
set sasdata.origin (firstobs = 75 obs = 499);
run;
The SAS data set SASDATA.ORIGIN contains 1000 observations.
How many observations does the ALLOBS data set contain?

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

Correct Answer : Get Lastest Questions and Answer :
Exp: when it read from 75 to 499 ,it will include 75 ,from 75 to it will read upto 499 so ,
499 - 75 +1 = 425



Related Questions


Question :

The following SAS program is submitted:

Data _null_;
set old;
put sales 1 sales2;
run;

Where is the output written?


 :
1. to the SAS log
2. to the SAS data set _NULL_
3. Access Mostly Uused Products by 50000+ Subscribers
4. to the raw data file that was most recently opened




Question : The following SAS program is submitted:

data work.test;
array items{3} _temporary_;
run;

What are the names of the variable(s) in the WORKTEST data set?
 : The following SAS program is submitted:
1. ITEMS
2. ITEMS1, ITEMS2, ITEMS3
3. Access Mostly Uused Products by 50000+ Subscribers
4. The program fails to execute because there are no variables listed on the ARRAY statement.


Question : Read the table from left

The following SAS program is submitted:
proc freq data = sales;
(insert TABLES statement here)
run;
The output is created by the FREQUENCY procedure is also shown in left:

Which TABLES statement(s) completed the program and produced the output?

 : Read the table from left
1. tables region product;
2. tables region * product;
3. Access Mostly Uused Products by 50000+ Subscribers
4. tables product; tables region;




Question : The following SAS program is submitted:

data one;
date = '04juI2014'd;
format date weekdate.; run;
proc print data = one; run;

What output is generated?
 : The following SAS program is submitted:
1. Obs date
1 Monday, July 4, 2014
2. Obs date
1 July4, 2014
3. Access Mostly Uused Products by 50000+ Subscribers
1 04Jul2014
4. Obs date
1 Monday, 07/04/2014


Question : Given the SAS data set PERM.STUDENTS:

PERM.STUDENTS NAME AGE
----------------
Allen 14
Alina 13
Babita 13
Kavel 14

The following SAS program is submitted:

libname perm `SAS data library';
data students;
set perm.students;
file `file specification';
put name $ age;
(insert statement here)
run;

The following double-spaced file is desired as output
Allen 14
Alina 13
Babita 13
Kavel 14

Which statement completes the program and creates the desired file?
 : Given the SAS data set PERM.STUDENTS:
1. put
2. put/;
3. Access Mostly Uused Products by 50000+ Subscribers
4. put _null_;


Question : For the first observation, what is the value of diff{i}
at the end of the second iteration of the DO loop?

array wt{*} obs1-obs10;
array diff{9};
do i=1 to 9;
diff{i}=wt{i+1}-wt{i};
end;

 : For the first observation, what is the value of diff{i}
1. 15
2. 10
3. Access Mostly Uused Products by 50000+ Subscribers
4. -7