Midterm 2 Flashcards

1
Q

Multiple INPUT statements

A

By default, SAS advances the pointer to column 1 of the next input record when SAS encounters an INPUT statement.

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

/ Line-pointer control

A

Advances the pointer to column 1 of the next input record.

Ex.
data work.kids8;
infile 'kids8.dat';
input name $1-8
siblings 10
/ @1 bdate mmddyy10.
@ 12 allowance comma2.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

n line pointer control

A
Advances the pointer to column 1 of record n.
Ex.
data work.kids8;
infile 'kids8.dat';
input #1 name $1-8
siblings 10
#2 @1 bdate mmddyy10.
@ 12 allowance comma2.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Single Trailing @

A

Holds an input record for the execution of the next INPUT statement within the same iteration of the DATA step.
Useful when you must read a record multiple times.

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

Which statement is false concerning the single trailing @?
A. In the INPUT statement, the single trailing @ must be the last item before the semicolon.
B. SAS releases a record held by a single trailing @ when an INPUT statement without a trailing @ executes.
C. The single trailing @ prevents the next INPUT statement from automatically releasing the current input record.
D. the single trailing @ holds the input record for the execution of the next INPUT statement across iterations of the DATA step.

A

D. the single trailing @ holds the input record for the execution of the next INPUT statement across iterations of the DATA step.

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

Double trailing @

A

Holds the input record for the execution of the next INPUT statement across iterations of the DATA step.
Is useful when each input line contains values for several observations.

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

Which statement is false concerning the double trailing @?
A. The double trailing @ must be the first item in the INPUT statement.

B. The double trailing @ is useful when one record contains several observations.

C. The double trailing @ holds a record for the next INPUT statement across iterations of the DATA step.

D. SAS releases the record that is held by a double trailing @ if the pointer moves past the end of the input record.

A

A. The double trailing @ must be the first item in the INPUT statement.

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

SAS/ACCESS LIBNAME statement

A

With the SAS/ACCESS interface to PC File Formats the LIBNAME statement can be used to access Microsoft excel workbooks.

If SAS has a library reference name assigned to an Excel workbook, the workbook cannot be opened in Excel.

This enables you to reference a worksheet directly in a DATA step or SAS procedure, and to read from and write to an Excel worksheet as if it were a SAS data set.

ex. libname myxls ‘customers.xls’;
proc contents data=myxls.all;

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

How do you reference the females worksheet in the Excel workbook customer base on the following LIBNAME statement?

libname myxls ‘customers.xls’;

A. myxls.females$
B. customer.females
C. myxls.’females$’n
D. customer.’females’n

A

C. myxls.’females$’n

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

Worksheets in SAS/ACCESS

A

Worksheet names appear with a dollar sign at the end of the name.

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

SAS name literal

A

Enable special characters to be included in data set names.

A name token that is expressed as a string withing quotation marks, followed immediately by the letter n.

ex. myxls.’females$’n

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

Which statement dis associates the MYXLS library reference name?

A. libname myxls end;
B. libname myxls clear;
C. libname myxls close;
D. libname myxls disassociate;

A

B. libname myxls clear;

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

SAS/ACCESS and bit count

A

The default Excel engine can be specified when the bit count of SAS and Microsoft Office are the same (both are 32-bit or both are 64-bit).
libname myxls excel ‘customers.xls’;

The PC Files Server engine must be specified when the bit counts differ.
libname myxls pcfiles path= ‘customers.xls’;

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