Advanced SAS Test 3 Flashcards

1
Q

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

A. DICTIONARY.COLUMNS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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

A

D. Temporary disk usage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
%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);

A

C. %LET codenum=%substr(&idcode,&length(&idcode)-2);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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.

A

B. It always accesses the most current data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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

A

D. &SYSERR

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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

A. MPRINT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which one of the following SAS SORT procedure options eliminates identical consecutive observations?

A. NODUP
B. UNIQUE
C. DISTINCT
D. NODUPKEY

A

A. NODUP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

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

A

D. It contains a partially compiled data step

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

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

A

D. SYMBOLGEN

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

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

A

C. 8

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

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.

A

C. It allows new observations to be inserted wherever enough free space exists.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

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.

A

C. The KEEP statement applies to all data sets created within the same DATA step.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

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

A

D. DESCRIBE VIEW

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

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.

A

C. It instructs SAS to use a specific index for WHERE processing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

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

A

C. Both user and system defined macro variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which one of the following options is available for SAS macro debugging?

A. MLOGIC
B. MDEBUG
C. MSGLEVEL
D. MAUTOSOURCE

A

A. MLOGIC

17
Q

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

A. Metadata on all tables in all libraries.

18
Q
%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

A

C. positional

19
Q

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

A

C. referencing a view multiple times in the same program

20
Q

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

A. Each observation is treated as a single string of bytes.