Hash Object Processing

At the beginning of the DATA step execution that follows, the hash object ContName is declared with a key component of ContinentID and data component of ContinentName. The Certadv.Country table is used to populate the hash object.
data work.countrycode;
   drop rc;
   length ContinentName $30;
   if _n_=1 then do;                                    /*1*/
      call missing (ContinentName);                     /*2*/
      declare hash ContName();                          /*3*/
      ContName.definekey('ContinentID');                /*4*/
      ContName.definedata('ContinentName');             /*5*/
      ContName.definedone();                            /*6*/
      ContName.add(key: 91, data: 'North America');     /*7*/
      ContName.add(key: 93, data: 'Europe');
      ContName.add(key: 94, data: 'Africa');
      ContName.add(key: 95, data: 'Asia');
      ContName.add(key: 96, data: 'Australia/Pacific');
   end;                                                 /*8*/ set ...

Get SAS Certified Professional Prep Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.