• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 4 out of 36 pages
Exam (elaborations)

SAS Base Exam (Programming 2) Questions With Complete Solutions

Document preview thumbnail
Preview 4 out of 36 pages

Which of the following is not created during the compilation phase? - the data set descriptor portion - the first observation - the program data vector - the _N_ and _ERROR_ automatic variables correct answer: the first observation ** No data is read during the compilation phase. The first observation is created in the execution phase ** During the compilation phase, SAS scans each statement in the DATA step, looking for syntax errors. Which of the following is not considered a syntax error? correct answer: incorrect data values ** Data values are not read during the compilation phase and do not generate syntax errors ** Unless otherwise directed, how many times does the DATA step loop execute? - once for each compilation phase - once for each DATA step statement - once for each row in the input file - once for each column in the input file correct answer: once for each row in the input file ** By default, the DATA step executes once for each row in the input file. It reads a row, processes the values in that row, and writes the row to an output table ** At the beginning of the execution phase, the value of _N_ is 1, the value of _ERROR_ is 0, and the values of the remaining variables are set to which of the following? - 0 - 1 - undefined - missing correct answer: missing ** The values of the remaining columns are assigned a missing value. Character columns are assigned a blank, and numeric columns are assigned a period. ** Suppose you run a program that causes three data errors. What is the value of the automatic variable _ERROR_ when the row that contains the third error is processed? - 0 - 1 - 2 - 3 correct answer: 1 ** _ERROR_ is 1 for any row that contains a data error ** Consider the following DATA step. Based on the sample input file below, in what order are the variables stored in the new fin2 table? data fin2; set finance; keep Name Raise NewSalary Date; if Salary25000 then Raise=0.03; else Raise=0.05; NewSalary=(Salary*Raise)+Salary; run; - Name, Raise, NewSalary, Date - SSN, Name, Salary, Date, Raise, NewSalary - Name, Date, Raise, NewSalary - Salary, NewSalary, Name, Raise correct answer: Name, Date, Raise, NewSalary ** The order of the columns in the PDV is determined by the order of the statements in the DATA step. The SET statement first adds the columns from the input table into the PDV, and then the assignment statements add Raise and NewSalary to the PDV. Only Name, Date, Raise, and NewSalary are kept in the output table ** Which of the following actions occurs at the beginning of an iteration of the DATA step? - The automatic variables _N_ and _ERROR_ are incremented by 1. - The DATA step stops execution. - The descriptor portion of the data set is written. - The values of variables created in programming statements are reset to missing in the program data vector. correct answer: The values of variables created in programming statements are reset to missing in the program data vector ** Any new columns created with programming statements are reset to missing at the beginning of each DATA step iteration ** If the input table contains five columns, which PUTLOG statements create the following results in the SAS log? - putlog "NOTE: Begin DATA Step"; putlog _all_; - putlog NOTE="Begin DATA Step"; putlog _all_; - putlog "NOTE: Begin DATA Step"; putlog Name Sex Age Height Weight _ERROR_ _N_; - putlog NOTE(Begin DATA Step); putlog all; correct answer: putlog "NOTE: Begin DATA Step"; putlog _all_;


Document information

Uploaded on
September 25, 2023
Number of pages
36
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers
$16.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Classroom
4.0
(1211)
Sold
5005
Followers
3246
Items
56710
Last sold
12 hours ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions

Whoops! We can’t load your doc right now. Try again or contact support.