Skip to Main Content
SAS Certified Professional Prep Guide
book

SAS Certified Professional Prep Guide

by SAS Institute
October 2019
Intermediate to advanced content levelIntermediate to advanced
430 pages
19h 4m
English
SAS Institute
Content preview from SAS Certified Professional Prep Guide

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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

SAS Certified Specialist Prep Guide

SAS Certified Specialist Prep Guide

SAS Institute
SAS in Practice

SAS in Practice

Ekta Saraogi

Publisher Resources

ISBN: 9781642954692