By admin | November 4, 2009

SAS Certified Adv Programmer 130 Questions (13)

The following SAS program is submitted:

data new (bufsize = 6144 bufno = 4);
    set old;
run;

Which one of the following describes the difference between the usage of BUFSIZE= and BUFNO= options?

A. BUFSIZE= specifies the size of the input buffer in bytes; BUFNO= specifies the number of input buffers.
B. BUFSIZE= specifies the size of the output buffer in bytes; BUFNO= specifies the number of output buffers.
C. BUFSIZE= specifies the size of the output buffer in kilobytes; BUFNO= specifies the number of input buffers.
D. BUFSIZE= specifies the size of the output buffer in kilobytes; BUFNO= specifies the number of output buffers.

By admin | November 4, 2009

SAS Certified Adv Programmer 130 Questions (12)

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(&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);

By admin | November 4, 2009

SAS Certified Adv Programmer 130 Questions (11)

The variable attributes of SAS data sets ONE and TWO are shown below:

ONE 
# Variable Type Len Pos 
2 sales    Num  8   8 
1 year     Num  8   0 

TWO
# Variable Type Len Pos
2 budget   Num  8   8
3 sales    Char 8   16
1 year     Num  8   0

Data set ONE contains 100 observations. Data set TWO contains 50 observations. Both data sets are sorted by the variable YEAR. The following SAS program is submitted:

data three;
    merge one two;
    by year; 
run;

Which one of the following is the result of the program execution?

A. No messages are written to the SAS log.
B. ERROR and WARNING messages are written to the SAS log.
C. Data set THREE is created with two variables and 50 observations.
D. Data set THREE is created with three variables and 100 observations.

By admin | November 4, 2009

SAS Certified Adv Programmer 130 Questions (10)

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.

By admin | November 4, 2009

SAS Certified Adv Programmer 130 Questions (9)

Given the following SAS data sets ONE and TWO:

ONE 
NUM COUNTRY 
1   CANADA 
2   FRANCE 
3   GERMANY
4   BELGIUM
5   JAPAN

TWO
NUM CITY
3   BERLIN
5   TOKYO

The following SAS program is submitted:

proc sql;
    select country from one
        where not exists (select * from two where one.num = two.num);
quit;

Which one of the following reports is generated?

A.
COUNTRY
GERMANY JAPAN

B.
COUNTRY
FRANCE BELGIUM

C.
COUNTRY
CANADA FRANCE BELGIUM

D.
COUNTRY
CANADA FRANCE GERMANY