This scenario uses the
Certadv.Airports and Certadv.Continent data sets. Write a SAS program
that does the following:
-
Write a SAS DATA step that reads
the Certadv.Airports data set and creates two temporary data sets
named Work.Success and Work.Fail.
-
During the first iteration of the
DATA step, load a hash object named C from the data set Certadv.Continent.
-
Use the numeric variable ID as
the key component.
-
Use the character variable CtName
as the data component.
-
Assign a length of 30 for the character
variable CtName.
-
Set the initial value to missing
to eliminate the uninitialized variable note.
-
In the DATA step, look up the value
of ID variable from Certadv.Airports in the C hash object.
-
Retrieve the value of CtName from
the hash object.
-
Create a variable named RC that
contains a numeric value representing whether a match is found.
-
Store the results of successful
lookups in the Work.Success data set.
-
Store the results of the unsuccessful
lookups in the Work.Fail data set.