SAS Certified Base Programmer 50 Questions (46)
A raw data record is listed below. 1—+—-10—+—-20—+— $23,456 750 The following SAS program is submitted: data bonus; infile ‘file-specification’; input salary $ 1-7 raise 9-11; <insert statement here> run; Which one of the following statements completes the program and adds the values of salary and raise to calculate the expected values of the newsalary […]
SAS Certified Base Programmer 50 Questions (45)
The following SAS program is submitted: data work.test; length city $20; city=’Paris’; city2=trim(city); run; Which one of the following is the length of the city2 variable? a. 5 b. 6 c. 8 d. 20
SAS Certified Base Programmer 50 Questions (44)
The following SAS program is submitted: proc contents data=sasuser._all_ nods; run; Which one of the following is produced as output? a. the list of all data set names in the Sasuser library only b. the descriptor portion of the data set named Sasuser._All_ c. the descriptor portion of every data set in the Sasuser library […]
SAS Certified Base Programmer 50 Questions (43)
The following SAS program is submitted: libname sasdata ‘SAS-data-library’; libname labdata ‘SAS-data-library’; data labdata.boston labdata.dallas(drop=city dest equipment); set sasdata.cities(keep=orig dest city price equipment); if dest=’BOS’ then output labdata.boston; else if dest=’DFW’ then output labdata.dallas; run; Which variables are output to both data sets? a. price and orig only b. city and equipment only c. city, […]
SAS Certified Base Programmer 50 Questions (42)
Assume that SAS data sets Sasdata.Products and Sasdata.Sales both contain the Prod_ID variable. Which of the following SAS DATA steps returns only exceptions or non matches? a. libname sasdata ‘SAS-data-library’; data all; merge sasdata.products sasdata.sales; by prod_id; if ins=1 or inp=1; run; b. libname sasdata ‘SAS-data-library’; data all; merge sasdata.products(in=inp) sasdata.sales(in=ins); by prod_id; if ins=1 […]