SAS Certified Base Programmer 50 Questions (18)
A raw data file is listed below. 1—+—-10—+—-20—+— 10 23 20 15 The following program is submitted: data all_sales; infile ‘file-specification’; input receipts; <insert statement(s) here> run; Which statement(s) complete(s) the program and produce(s) a running total of the Receipts variable? a. total+receipts; b. total 0; sum total; c. total=total+receipts; d. total=sum(total,receipts);
SAS Certified Base Programmer 50 Questions (17)
The following SAS program is submitted: data fltaten; input jobcode $ salary name $; cards; FLAT1 70000 Bob FLAT2 60000 Joe FLAT3 30000 Ann ; run; data desc; set fltaten; if salary>60000 then description=’Over 60′; else description=’Under 60′; run; What is value of the variable named description when the value for salary is 30000? a. […]
SAS Certified Base Programmer 50 Questions (16)
Which of the following statements creates a numeric variable named IDnumber with a value of 4198? a. IDnumber=4198; b. IDnumber=’4198′; c. length IDnumber=8; c. length IDnumber $ 8;
SAS Certified Base Programmer 50 Questions (15)
The following SAS program is submitted: data work.building; code=’DAL523′; code=’SANFRAN604′; code=’HOUS731′; run; Which one of the following is the length of the code variable? a. 6 b. 7 c. 10 d. 20
SAS Certified Base Programmer 50 Questions (14)
Which one of the following SAS programs creates a variable named City with a value of Chicago? a. data work.airports; AirportCode=’ord’; if AirportCode=’ORD’ City=’Chicago’; run; b. data work.airports; AirportCode=’ORD’; if AirportCode=’ORD’ City=’Chicago’; run; c. data work.airports; AirportCode=’ORD’; if AirportCode=’ORD’ then City=’Chicago’; run; d. data work.airports; AirportCode=’ORD’; if AirportCode=’ORD’; then City=’Chicago’; run;