Advanced SAS Test 3 Flashcards
(20 cards)
Which DICTIONARY table provides information on all the tables containing a variable named LASTNAME?
A. DICTIONARY.COLUMNS
B. DICTIONARY.VARIABLES
C. DICTIONARY.MEMBERS
D. DICTIONARY.TABLES
A. DICTIONARY.COLUMNS
The following SAS program is submitted:
proc sort data=sales tagsort; by month year; run;
Which of the following resource(s) is the TAGSORT option reducing?
A. I/O usage only
B. CPU usage only
C. I/O and CPU usage
D. temporary disk usage
D. Temporary disk usage
%let idcode=Prod567; Which one of the following statements stores the value 567 in the macro variable CODENUM?
A. %LET codenum=substr(&idcode,length(&idcode)-2;
B. %LET codenum=substr(&idcode,length(&idcode)-3);
C. %LET codenum=%substr(&idcode,&length(&idcode)-2);
D. %LET codenum=%substr(&idcode,&length(&idcode)-3);
C. %LET codenum=%substr(&idcode,&length(&idcode)-2);
Which one of the following is an advantage of creating and using a SAS DATA step view?
A. It can store an index.
B. It always accesses the most current data.
C. It works quickly through multiple passes of the data.
D. It is useful when the underlying data file structure changes.
B. It always accesses the most current data.
Which one of the following automatic SAS macro variables contains the return code from a previously executed step?
A. &RC
B. &ERR
C. &SYSRC
D. &SYSERR
D. &SYSERR
Test 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
A. MPRINT
Which one of the following SAS SORT procedure options eliminates identical consecutive observations?
A. NODUP
B. UNIQUE
C. DISTINCT
D. NODUPKEY
A. NODUP
Which one of the following statements is true regarding a SAS DATA STEP view?
A. It allows write capabilities
B. It contains global statements
C. It contains data and a descriptor portion
D. It contains a partially compiled data step
D. It contains a partially compiled data step
Which one of the following options displays the value of a macro variable in the SAS log?
A. MACRO
B. SOURCE
C. SOURCE2
D. SYMBOLGEN
D. SYMBOLGEN
array score{*} a4-a10,a25;
Which one of the following is the maximum number of elements stored in array score?
A. 3
B. 7
C. 8
D. 11
C. 8
Which one of the following is the purpose of the REUSE=YES option in a compressed SAS data set?
A. It temporarily compresses observations in a SAS data set.
B. It allows users to update the same SAS data set concurrently.
C. It allows new observations to be inserted wherever enough free space exists.
D. It specifies that a new empty data set with a given name replaces an existing data set with the same name.
C. It allows new observations to be inserted wherever enough free space exists.
Which 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.
C. The KEEP statement applies to all data sets created within the same DATA step.
Which one of the following displays the definition of a stored SQL procedure view in the SAS log?
A. ECHOVIEW
B. EXPANDVIEW
C. VALIDATE VIEW
D. DESCRIBE VIEW
D. DESCRIBE VIEW
Which one of the following is the purpose of the IDXNAME= data set option?
A. It instructs SAS to name and store a specific index.
B. It instructs SAS to store an index in a particular location.
C. It instructs SAS to use a specific index for WHERE processing.
D. It instructs SAS to use any available index for WHERE PROCESSING.
C. It instructs SAS to use a specific index for WHERE processing.
The DICTIONARY.MACROS table stores information about which of the following?
A. User defined macro variables only
B. System defined macro variables only
C. Both user and system defined macro variables
D. Macros stored in the auto-call macro library only
C. Both user and system defined macro variables
Which one of the following options is available for SAS macro debugging?
A. MLOGIC
B. MDEBUG
C. MSGLEVEL
D. MAUTOSOURCE
A. MLOGIC
proc sql;
select * from dictionary.tables; quit;
Which one of the following is reported?
A. Metadata on all tables in all libraries.
B. Metadata on all tables in the WORK library only
C. Metadata on all tables in the SASUSWER library only
D. Metadata on all tables in the DICTIONARY library only
A. Metadata on all tables in all libraries.
%macro test(var) proc print data=sasuser.class; where age>&var; run; %mend; Which type of parameter is the macro variable VAR?
A. default
B. keyword
C. positional
D. command
C. positional
Which one of the following should be avoided when creating and using an SQL procedure view?
A. using a HAVING clause
B. using summary functions
C. referencing a view multiple times in the same program
D. creating views on tables whose structures remain constant
C. referencing a view multiple times in the same program
Which of the following statements about compressed SAS data sets is always true?
A. Each observation is treated as a single string of bytes.
B. Each observation occupies the same number of bytes.
C. An updated observation is stored in its original location.
D. New observations are added to the end of the SAS data set.
A. Each observation is treated as a single string of bytes.