The following SAS program is submitted:
data work.one;
x = 3;
y = 2;
z = x **y;
run;
Which one of the following is the value of the variable Z in the output data set?
A. 6
B. 9
C. .(missing numeric value)
D. The program fails to execute due to errors.
The following SAS program is submitted:
proc means data = sasuser.shoes;
where product in (`Sandal' , `Slipper' , `Boot');
run;
Which one of the following ODS statements completes the program and sends the report to an HTML file?
A. ods html = `sales.html';
B. ods file = `sales.html';
C. ods file html = `sales.html';
D. ods html file = `sales.html';
The following SAS program is submitted:
Data_null;
set old (keep = prod sales 1 sales2);
file `file-specification';
put sales1 sales2; run;
Which one of the following default delimiters separates the fields in the raw data file created?
A. : (colon)
B. (space)
C. , (comma)
D. ; (semicolon)
A raw data file is listed below:
RANCH, 1250,2,1 Sheppard Avenue,"$64,000"
SPLIT,1 190,1,1 Rand Street"$65,850"
CONDO,1400,2,1.5,Market Street,"80,050"
TWOSTORY,1810,4,3,Garris Street,"$107,250"
RANCH,1 500 ,3,3,Kemble Avenue "$86,650"
SPLIT, 1615,4,3 ,West Drive,"94,450"
SPLIT, 1305,3,1.5,Graham Avenue "$73,650"
The following SAS program is submitted using the raw data file as input:
data work.condo_ranch
infile `file-specification' dsd
input style $ @;
if style = `CONDO' or style = `RANCH' then
input sqfeet bedrooms baths street $ price : dollar10.; run;
How many observations does the WORK.CONDO_RANCH data set contain?
A. 0
B. 3
C. 5
D. 7
Unless specified, which variables and data values are used to calculate statistics in the MEANS procedure?
A. non-missing numeric variable values only
B. missing numeric variable values and non-missing numeric variable values only
C. nun-missing character variables and nun-missing numeric variable values only
D. missing character variables, nun-missing character variables, missing numeric variable values, and nun-missing numeric variable values
The following SAS program is submitted:
data work.passengers;
if OrigPassengers = then
OrigPassengers = 100;
TransPassengers = 100;
OrigPassengers = .;
NonPaying = 10;
TotalPassengers = sum (OrigPassengers, TransPassengers); run;
Which one of the following is the value of the TOTALPASSENGERS variable in the output data set?
A. 100
B. 110
C. 200
D. (missing numeric value)
The following SAS program is submitted:
libname rawdata1 `location of SAS data library'; filename rawdata2 `location of raw data file';
data work.testdata; infile
Which one of the following is needed to complete the program correctly?
A. rawdata1
B. rawdata2
C. `rawdata1'
D. `rawdata2'
The SAS data set named COMPANY.PRICES is listed below:
The following SAS program is submitted:
libname company `SAS-data-library';
data hware inter soft;
set company.prices (keep = producttype price);
if price le 5.00;
if producttype = `HARDWARE' then output HWARE;
else if producttype = `NETWORK' then output INTER; else if producttype = `SOFTWARE' then output SOFT; run;
How many observations does the HWARE data set contain?
A. 0
B. 2
C. 4
D. 6
The following SAS program is submitted:
proc sort data=work.employee;
by descending fname;
proc sort data=work.salary;
by descending fname;
data work.empdata;
merge work.employee
work salary;
by fname;
run;
Which one of the following statements explains why the program failed execution?
The SORT procedures contain invalid syntax.
The merged data sets are not permanent SAS data sets. The data sets were not merged in the order by which they were sorted. The RUN statements were omitted after each of the SORT procedures.
A.
B.
C.
D.
The following SAS program is submitted:
data work.empsalary;
set work.people (in = inemp)
work.money (in = insal);
if insal and inemp;
run;
The SAS data set WORK.PEOPLE has 5 observations, and the data set WORK.MONEY has 7 observations. How many observations will the data set WORKEMPSALARY contain?
A. 0
B. 5
C. 7
D. 12
The following SAS program is submitted:
data work.january;
set work.allmonths (keep = product month num_sold cost); if month = `Jan' then output work.january
sales = cost * num_sold;
keep = product sales;
run;
Which variables does the WORK.JANUARY data set contain?
A. PRODUCT and SALES only
B. PRODUCT, MONTH, NUM_SOLD and COST only
C. PRODUCT, SALES, MONTH, NUM_SOLD and COST only
D. An incomplete output data set is created due to syntax errors.
The following SAS program is submitted:
data work.flights;
destination = `cph';
select(destination); when('LHR') city = `London';
when('CPH') city = `Copenhagen';
otherwise city = `Other';
end;
run;
Which one of the following is the value of the CITY variable?
A. Other
B. Copenh
C. Copenhagen
D. ``(missing character value)
The following SAS DATA step is submitted:
data sasdata.atlanta
sasdata.boston
work.portland work.phoenix;
set company.prdsales;
if region = `NE' then output boston;
if region = `SE' then output atlanta;
if region = `SW' then output phoenix;
if region = `NW' then output portland;
run;
Which one of the following is true regarding the output data sets?
A. No library references are required.
B. The data sets listed on all the IF statements require a library reference.
C. The data sets listed in the last two IF statements require a library reference.
D. The data sets listed in the first two IF statements require a library reference.
Which one of the following SAS statements renames two variables?
A. set work.dept1 work.dept2(rename = Ucode =jobcode) (sal salary));
B. set work.dept1 workdept2(rename = Ucode =jobcode sal = salary));
C. set work.dept1 work.dept2(rename =jcode =jobcode sal = salary);
D. set work.dept1 work.dept2(rename = Ucode jobcode) (sal salary));
The following SAS program is submitted:
libname sasdata `SAS-data-library';
data test;
set sasdata.chemists (keep = job_code);
if job_code `chem3'
then description = `Senior Chemist';
run;
The variable JOB_CODE is a character variable with a length of 6 bytes.
Which one of the following is the length of the variable DESCRIPTION in the output data set?
A. 6 bytes
B. 8 bytes
C. 14bytes
D. 200 bytes