By admin | August 10, 2009

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

By admin | August 10, 2009

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 […]

By admin | August 10, 2009

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, […]

By admin | August 10, 2009

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 […]

By admin | August 10, 2009

SAS Certified Base Programmer 50 Questions (41)

A raw data file is listed below. 1—+—-10—+—-20—+— 01/05/1989 Frank 11 12/25/1987 June 13 01/05/1991 Sally 9 The following SAS program is submitted using the raw data file as input: data work.family; infile ‘file-specification’; input @1 date_of_birth mmddyy10. @15 first_name $5. @25 age 3; run; proc print data=work.family noobs; run; Which one of the following […]