Practice for the SAS advance certification exam.
Code and IDnum
Manager and Supervisor
Manager and IDnum
There are no variables that are common to both of these data sets.
Rate this question:
You use a MERGE statement in one DATA step to merge Dataset1, Dataset2, and Dataset3 by Startdate and Instructor.
You sort Dataset1 and Dataset2 by Startdate and merge them into a temporary data set in a DATA step. Then you sort the temporary data set and Dataset3 by Instructor and merge them into a new data set in a DATA step.
You can merge these data sets only with a PROC SQL step.
You cannot merge these three data sets at all because they do not have a common variable.
Rate this question:
proc sql; select newsals.empcode allemps.lastname newsals.salary contrib.amount from sasuser.allemps, sasuser.contrib, sasuser.newsals where empcode=allemps.empid and empcode=contrib.empid; quit;
proc sql; create table usesql as select newsals.empcode allemps.lastname newsals.salsry contrib.amount from sasuser.allemps, sasuser.contrib, sasuser.newsals quit;
proc sql; create table usesql as; select newsals.empcode, allemps.lastname, newsals.salary, contrib.amount; from sasuser.allemps, sasuser.contrib, sasuser.newsals; where empcode=allemps.empid and empcode=contrib.empid; quit;
proc sql; create table usesql as select newsals.empcode, allemps.lastname, newsals.salary, contrib.amount from sasuser.allemps, sasuser.contrib, sasuser.newsals where empcode=allemps.empid and empcode=contrib.empid; quit;
Rate this question:
Next, SAS sequentially match-merges observations and writes the new observation to the PDV, then to the new data set. When the BY value changes in all the input data sets, the PDV is initialized to missing. Missing values for variables, as well as missing values that result from unmatched observations, are written to the new data set.
Next, SAS sequentially match-merges observations and writes the new observation to the PDV, then to the new data set. After each DATA step iteration, the PDV is initialized to missing. Missing values for variables, as well as missing values that result from unmatched observations, are omitted from the new data set.
Next, SAS creates a Cartesian product of all possible combinations of observations and writes them to the PDV, then to the new data set. Then SAS goes through the new data set and eliminates all observations that do not have matching values of the BY variable.
Next, SAS creates a Cartesian product of all possible combinations of observations and writes them to the PDV, then to the new data set. The new data set is then ordered by values of the BY variable.
Rate this question:
You can use multiple SET statements to combine observations from several SAS data sets.
Processing stops when SAS encounters the end-of-file (EOF) marker on either data set (even if there is more data in the other data set).
You can use multiple SET statements in one DATA step only if the data sets in each SET statement have a common variable.
The variables in the PDV are not reinitialized when a second SET statement is executed.
Rate this question:
proc sum data=sasuser.emdata noprint; output out=sasuser.summary sum=Salarysum; run;
proc means data=sasuser.empdata noprint; var salary; output out=sasuser.summary sum=Salarysum; run;
proc sum data=sasuser.empdata noprint; var salary; output out=sasuser.summary sum=Salarysum; run;
proc means data=sasuser.empdata noprint; output=sasuser.summary sum=Salarysum; run;
Rate this question:
$1000
$3000
The value is missing.
The value cannot be determined without seeing the data that is in Sasuser.Summary.
Rate this question:
The value is missing.
$350.00
$520.00
$1100.00
Rate this question:
data work.profit; set sasuser.sale2000(keep=routeid flightid date rev1st revbusiness revecon revcargo) key=flightdate; set sasuser.dnunder; Profit=sum(rev1st, revbusiness, revecon, revcargo, -expenses); run;
data work.profit; set sasuser.dnunder; set sasuser.sale2000(keep=routeid flightid date rev1st revbusiness revecon revcargo) key=flightdate; where routeid='0000103'; Profit=sum(rev1st, revbusiness, revecon, revcargo, -expenses); run;
data work.profit; set sasuser.dnunder; set sasuser.sale2000(keep=routeid flightid date rev1st revbusiness revecon revcargo); key=flightdate; Profit=sum(rev1st, revbusiness, revecon, revcargo, -expenses); run;
data work.profit; set sasuser.dnunder; set sasuser.sale2000(keep=routeid flightid date rev1st revbusiness revecon revcargo) key=flightdate; Profit=sum(rev1st, revbusiness, revecon, revcargo, -expenses); run;
Rate this question:
It is automatically created when you use either a SET statement with the KEY= option or the MODIFY statement with the KEY= option in a DATA step.
A value of zero for _IORC_ means that the most recent SET statement with the KEY= option (or MODIFY statement with the KEY= option) did not execute successfully.
A value of zero for _IORC_ means that the most recent SET statement with the KEY= option (or MODIFY statement with the KEY= option) executed successfully.
You can use the _IORC_ variable to prevent nonmatching data from being included when you use an index to combine data from multiple data sets.
Rate this question:
Quiz Review Timeline +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.