Correct Answer : Get Lastest Questions and Answer : Explanation: As you can see in the given program its a do loop. Hence, until loop finishes it will hold last value upto 12. Once, the loop finishes it will be again incremented by 1 (12+1) which becomes 13 and it will not go inside the loop. So final value become 13.
Question : The following PROC PRINT output was created immediately after PROC TABULATE output. Which system options were specified when the report was created? 1. OBS=, DATE, and NONUMBER 2. NUMBER, PAGENO=1, and DATE 3. Access Mostly Uused Products by 50000+ Subscribers 4. none of the above
Ans : 2 Exp : Clearly, the DATE and NUMBER (page number) options are specified. Because the page number on the output is 1, even though PROC TABULATE output was just produced, PAGENO=1 must also have been specified. If you don't specify PAGENO=, all output in the Output window is numbered sequentially throughout your SAS session.
Question :
Which of the following programs correctly references a SAS data set named SalesAnalysis that is stored in a permanent SAS library?
1. data saleslibrary.salesanalysis; set mydata.quarter1sales; if sales>100000; run; 2. data mysales.totals; set sales_99.salesanalysis; if totalsales>50000; run; 3. Access Mostly Uused Products by 50000+ Subscribers var sales salesrep month; run; 4. proc freq data=1999data.salesanalysis; tables quarter*sales; run;
Ans : 2 Exp : Librefs must be 1 to 8 characters long, must begin with a letter or underscore, and can contain only letters, numerals, or underscores. After you assign a libref, you specify it as the first level in the two-level name for a SAS file.
Question : You have been given below SAS program, select the statement which is correct
data course100 ; Fee=5000; FEE_HIKE=0.1;
do month=1 to 12 ; INCREASE+(FEE+INCREASE)*FEE_HIKE; iteration+1; output; end; put _all_; run;
A. There would be 12 iteration B. Output statement will help in generating only last observation as an output. C. Last value hold by month variable will be 13 D. Iteration variable is redundant, and does not help in creating output.
Correct Answer : Get Lastest Questions and Answer : Explanation: There would in total 12 iteration as given do statement stop value. Yes, there is as such no use of iteration variable. You can remove that statement. As soon as 12 iterations have finished, next value hold by month variable is 13 and conditions become false which stops the next iteration.
Question : You have been given below SAS program
data course100 ; Fee=5000; FEE_HIKE=0.1;
do month=1 to 15 by 3 ; INCREASE+(FEE+INCREASE)*FEE_HIKE; iteration+1; output; end; put _all_; run;
Correct Answer : Get Lastest Questions and Answer : Explanation: As you can see given do statement is started with 1 and incremented by value 3. It should not reach beyond 15.
1+3=4 4+3=7 7+3=10 10+3=13 13+3=16
Hence, upto 13 do statement will be executed which will generate 5 observation. And as soon as index value become 16, condition will be false and discarded.