What are the DEFINE
methods that are required to define a hash object?
DEFINEKEY
DEFINEDATA
DEFINEDONE
All of the above.
What does the FIND hash
object method do?
Adds data associated
with a key to the hash object.
Determines whether the
key is stored in the hash object.
Defines key variables
to the hash object.
Specifies that all key
and data definitions are complete.
What does the PREV method
do?
Returns the first value
in the underlying hash object.
Returns the next value
in the underlying hash object.
Returns the last value
in the underlying hash object.
Returns the previous
value in the underlying hash object.
What does the CALL MISSING
routine do?
Instantiates the hash
object.
Assigns a missing value
to the specified character or numeric variables.
Declares a hash object.
Calls to retrieve multiple
data values.
You can define a hash
iterator without defining a hash object.
True
False
Which of the following
programs correctly associates more than one data value with one key?
data work.sample1;
if 0 then
set certadv.acities(keep= Code City Name);
if _N_=1 then do;
declare hash airports (dataset:"certadv.acities");
airports.defineKey ("Code");
airports.defineData ("City", "Name");
airports.defineDone();
end;
run;
data work.sample2;
if 0 then
set certadv.acities(keep= Code City Name);
if _N_=1 then do;
declare hash airports (dataset:"certadv.acities");
airports.defineKey ("City", "Name");
airports.defineData ("Code");
airports.defineDone();
end;
run;
data work.sample3;
if 0 then
set certadv.acities(keep= Code City Name);
if _N_=1 then do;
declare hash airports (dataset:"certadv.acities");
airports.defineKey ("Code", "City");
airports.defineData ("City", "Name");
airports.defineDone();
end;
run;
data work.sample4;
if 0 then
set certadv.acities(keep= Code City Name);
if _N_=1 then do;
declare hash airports ();
airports.defineKey ();
airports.defineData ();
airports.defineDone();
end;
run;