Given the following SAS statement:
%let idcode = Prod567;
Which one of the following statements stores the value 567 in the macro variable CODENUM?
A. %let codenum = substr(andidcode,length(andidcode)-2);
B. %let codenum = substr(andidcode,length(andidcode)-3);
C. %let codenum = %substr(andidcode,%length(andidcode)-2);
D. %let codenum = %substr(andidcode,%length(andidcode)-3);
Which one of the following is true regarding the KEEP statement?
A. The KEEP statement is available in both the DATA and the PROC steps.
B. The KEEP statement selects the variables read from the input data set(s).
C. The KEEP statement applies to all data sets created within the same DATA step.
D. The KEEP statement applies only to the first data set created within the same DATA step if more than one data set is created.
Which one of the following displays the definition of a stored SQL procedure view in the SAS log?
A. ECHOVIEW option
B. EXPANDVIEW option
C. VALIDATE VIEW statement
D. DESCRIBE VIEW statement
Which one of the following options is available for SAS macro debugging?
A. MLOGIC
B. MDEBUG
C. MSGLEVEL
D. MAUTOSOURCE
Which one of the following statements is true?
A. The WHERE statement can be executed conditionally as part of an IF statement.
B. The WHERE statement selects observations before they are brought into the PDV.
C. The subsetting IF statement works on observations before they are read into the PDV.
D. The WHERE and subsetting IF statements can be used interchangeably in all SAS programs.
Text is sent to the SAS compiler as a result of macro execution. Which one of the following SAS system options writes that text to the log?
A. MPRINT
B. MLOGIC
C. MSOURCE
D. SOURCE2
Which one of the following programs contains a syntax error?
A. proc sql; select product.*, cost.unitcost, sales.quantity from product p, cost c, sales s where p.item = c.item and
B. item = s.item; quit;
C. proc sql; select product.*, cost.unitcost, sales.quantity from product, cost, sales where product.item = cost.item and product.item = sales.item; quit;
D. proc sql; select p.*, c.unitcost, s.quantity from product as p, cost as c, sales as s where p.item = c.item and
E. item = s.item; quit;
F. proc sql; select p.*, c.unitcost, s.quantity from product, cost, sales where product.item = cost.item and product.item = sales.item; quit;
The SAS data set ONE contains the variables X, Y, Z, and W.
The following SAS program is submitted:
proc transpose data = one
out = trans
name = new;
by x;
var y;
run;
Which one of the following contains all the names of the columns created by the TRANSPOSE procedure?
A. X, Y, Z, and W
B. _NAME_, X, and Y
C. new, X, and COL1
D. new, X, Y, and _COL1_
Which one of the following options controls the pagesize of a SAS data set?
A. SIZE=
B. BUFNO=
C. BUFSIZE=
D. PAGESIZE=
The following SAS program is submitted:
%let first = yourname;
%let last = first;
%put andandandlast;
Which one of the following is the result in the log of the %PUT statement?
A. first
B. andfirst
C. yourname
D. andyourname