By admin | December 9, 2009

SAS Certified Adv Programmer 130 Questions (28)

Given the following SAS data set ONE:

ONE 
REP   AREA  COST
SMITH NORTH 100
SMITH SOUTH 200
JONES EAST  100
SMITH NORTH 300
JONES WEST  100
JONES NORTH 200
JONES NORTH 400
SMITH NORTH 400
JONES WEST  100
JONES WEST  300

The following SAS program is submitted:

proc sql;
    select rep, area, count(*) as TOTAL from one group by rep, area; 
quit;

Which one of the following reports is generated?

A.

REP   AREA  COUNT
JONES EAST  100
JONES NORTH 600
JONES WEST  500
SMITH NORTH 800
SMITH SOUTH 200

B.

REP   AREA  TOTAL
JONES EAST  100
JONES NORTH 600
JONES WEST  500
SMITH NORTH 800 
SMITH SOUTH 200

C.

REP   AREA  TOTAL
JONES EAST  1
JONES NORTH 2
JONES WEST  3
SMITH NORTH 3

D.

REP   AREA  TOTAL
JONES EAST  1
JONES NORTH 2
JONES WEST  3
SMITH NORTH 3
SMITH SOUTH 1
By admin | December 9, 2009

SAS Certified Adv Programmer 130 Questions (27)

The SAS data set ONE has a variable X on which an index has been created. The data sets ONE and THREE are sorted by X. Which one of the following SAS programs uses the index to select observations from the data set ONE?

A.

data two;
    set three;
    set one key = X;
run;

B.

data two;
    set three key = X; 
    set one;
run;

C.

data two;
    set one;
    set three key = X;
run;

D.

data two;
    set three;
    set one (key = X);
run; 

By admin | December 2, 2009

SAS Certified Adv Programmer 130 Questions (26)

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

By admin | December 2, 2009

SAS Certified Adv Programmer 130 Questions (25)

Given the following SAS data sets ONE and TWO:

ONE 
NUM CHAR1 
1   A
2   B
4   D

TWO 
NUM CHAR2
2   X
3   Y
5   V

The following SAS program is submitted creating the output table THREE:

data three;
    set one two;
run;
THREE 
NUM CHAR1 CHAR2
1   A
2   B
4   D
2         X
3         Y
5         V

Which one of the following SQL programs creates an equivalent SAS data set THREE?

A.
proc sql; 
    create table three as
        select * from one outer union corr
        select * from two; 
quit;

B.

proc sql;
    create table three as
        select * from one outer union
        select * from two;
quit;

C.

proc sql;
    create table three as
        select * from one outer union
        select *
quit;

D.

proc sql;
    create table three as
        select * from one union corr
        select * from two;
quit; 
By admin | December 2, 2009

SAS Certified Adv Programmer 130 Questions (24)

Given the following SAS data set ONE:

ONE 
COUNTRY CITY   VISIT
USA     BOSTON 10
UK      LONDON 5
USA     DALLAS 10
UK      MARLOW 10
USA     BOSTON 20
UK      LONDON 15
USA     DALLAS 10

The following SAS program is submitted:

proc sql;
    select country, city, sum(visit) as TOTAL
        from one group by country, city order by country, total desc;
quit;

Which one of the following reports is generated?

A.

COUNTRY CITY   TOTAL 
UK      MARLOW 10
UK      LONDON 20
USA     BOSTON 50
USA     DALLAS 20

B.

COUNTRY CITY   TOTAL
UK      LONDON 20
UK      MARLOW 10
USA     BOSTON 50
USA     DALLAS 20

C.

COUNTRY CITY   TOTAL
USA     BOSTON 50

D.

COUNTRY CITY   TOTAL
UK      MARLOW 10
UK      LONDON 20
USA     DALLAS 20
USA     BOSTON 50 
Pages: Prev 1 2 ... 4 5 6 7 8 ... 55 56 Next