SAS Certified Adv Programmer 50 Questions (46)
Which one of the following SAS SORT procedure options eliminates observations with identical BY values?
a. NODUP
b. UNIQUE
c. DISCRETE
d. NODUPKEY
SAS Certified Adv Programmer 50 Questions (45)
The following SAS program is submitted:
data one; do pt=1 to 14 by 2; set temp point=pt nobs=totobs; output; end; stop; run;
The SAS data set Temp has 2,500,000 observations. Which one of the following represents the observations included in the data set One?
a. the first 14 observations from Temp
b. all 2,500,000 observations from Temp
c. a random sample of the observations from Temp
d. a systematic sample of the observations from Temp
SAS Certified Adv Programmer 50 Questions (44)
Which one of the following statements is true?
a. A WHERE statement can select observations only from SAS data sets.
b. Efficiency is affected by the placement of the WHERE statement in the DATA step.
c. The FIRSTOBS= and OBS= data set options are never allowed in a step with a WHERE expression.
d. There is a significant efficiency difference between a WHERE statement and a WHERE= data set option in the input data set.
SAS Certified Adv Programmer 50 Questions (43)
The SAS data set Temp contains 1,000 observations and 10 variables. Which one of the following SAS DATA steps writes the variables a, b, and c to both SAS data sets One and Two?
a.
data one two(keep=a b c); set temp(keep=a b c d); run;
b.
data one two; set temp(keep=a b c); run;
c.
data one(keep=a b c) two; set temp(keep=a b c d); run;
d.
data one(keep=a b c) two(keep=a c); set temp(keep=a b c); run;
SAS Certified Adv Programmer 50 Questions (42)
The SAS data set One consists of five million observations and has 25 variables. Which one of the following SAS programs requires the least CPU time to be processed?
a.
data two; set one; if year(date)=1999 and state in ('NY' 'NJ' 'CT') then sales=sales98*1.1; else if year(date)=2000 and state in ('NY' 'NJ' 'CT') then sales=sales98*1.15; else if year(date)=2001 and state in ('NY' 'NJ' 'CT') then sales=sales98*1.2; run;
b.
data two; set one; if year(date)=1999 and state in ('NY' 'NJ' 'CT') then sales=sales98*1.1; if year(date)=2000 and state in ('NY' 'NJ' 'CT') then sales=sales98*1.15; if year(date)=2001 and state in ('NY' 'NJ' 'CT') then sales=sales98*1.2; run;
c.
data two; set one; if state in ('NY' 'NJ' 'CT')then do; year=year(date); if year=1999 and state in('NY' 'NJ' 'CT') then sales=sales98*1.1; if year=2000 and state in('NY' 'NJ' 'CT') then sales=sales98*1.15; if year=2001 and state in('NY' 'NJ' 'CT') then sales=sales98*1.2 end; run;
d.
data two; set one; if state in('NY' 'NJ' 'CT') then do; year=year(date); select(year); when(1999) sales=sales98*1.1; when(2000) sales=sales98*1.15; when(2001) sales=sales98*1.2; otherwise; end; end; run;