Quiz

  1. In which step does the SAS hash object exist?
    1. PROC step
    2. DATA step
    3. OPTIONS
    4. a and b only.
  2. What does a component object consist of?
    1. Methods
    2. Attributes
    3. Both a and b.
    4. None of the above.
  3. What are the DEFINE methods that are required to define a hash object?
    1. DEFINEKEY
    2. DEFINEDATA
    3. DEFINEDONE
    4. All of the above.
  4. What does the FIND hash object method do?
    1. Adds data associated with a key to the hash object.
    2. Determines whether the key is stored in the hash object.
    3. Defines key variables to the hash object.
    4. Specifies that all key and data definitions are complete.
  5. What does the PREV method do?
    1. Returns the first value in the underlying hash object.
    2. Returns the next value in the underlying hash object.
    3. Returns the last value in the underlying hash object.
    4. Returns the previous value in the underlying hash object.
  6. What does the CALL MISSING routine do?
    1. Instantiates the hash object.
    2. Assigns a missing value to the specified character or numeric variables.
    3. Declares a hash object.
    4. Calls to retrieve multiple data values.
  7. You can define a hash iterator without defining a hash object.
    1. True
    2. False
  8. Which of the following programs correctly associates more than one data value with one key?
    1. 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;
    2. 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;
    3. 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;
    4. 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;
Last updated: October 16, 2019
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.140.79