SAS Certified Base Programmer 123 Questions (1)
In the following SAS program, the input data files are sorted by the NAMES variable:
libnametemp 'SAS-data-library'; data temp.sales; merge temp.sales work.receipt; by names; run;
Which one of the following results occurs when this program is submitted?
A. The program executes successfully and a temporary SAS data set is created.
B. The program executes successfully and a permanent SAS data set is created.
C. The program fails execution because the same SAS data set is referenced for both read and write operations.
D. The program fails execution because the SAS data sets on the MERGE statement are in two different libraries.
SAS Certified Adv Programmer 50 Questions (50)
Which one of the following is used to create an index for a SAS data set?
a. INDEX function
b. INDEX= data set option
c. CREATE INDEX statement in the INDEX procedure
d. CREATE INDEX statement in the DATASETS procedure
SAS Certified Adv Programmer 50 Questions (49)
Which one of the following SAS programs is the most efficient in producing and removing an index from a SAS data set?
a.
proc datasets lib=sasuser; modify houses; index create style; index delete location; quit;
b.
proc datasets lib=sasuser; modify houses; index delete location; index create style; quit;
c.
proc datasets lib=sasuser; modify houses; delete index location; quit; proc datasets lib=sasuser; modify houses; create index style; quit;
d.
proc datasets lib=sasuser; modify houses; delete index location; create index style; quit;
SAS Certified Adv Programmer 50 Questions (48)
The following SAS program is submitted:
data new(sortedby=date); infile rawdata; input date mmddyy10. employeeID $ salary; run;
Which one of the following is the purpose of the SORTEDBY= data set option?
a. to specify how the data set is currently sorted
b. to sort the data values in Date order in the SAS data set New
c. to issue a call to the SORT procedure after the DATA step completes
d. to sort the data in Rawdata by Date before reading the external file
SAS Certified Adv Programmer 50 Questions (47)
The SAS data set Sasdata.Sales has a simple index for the variable Date and a variable named Revenue with no index. In which one of the following SAS programs is the Date index considered for use?
a.
proc print data=sasdata.sales; by date; run;
b.
proc print data=sasdata.sales; where month(date)=3; run;
c.
data march; set sasdata.sales; if '01mar2002'd < date < '31mar2002'd; run;
d.
data march; set sasdata.sales; where date < '31mar2002'd or revenue > 50000; run;