hash and hash iterator objects
enable you to quickly and efficiently store, search, and retrieve data based on lookup
keys. The hash object keys and data are DATA step variables. Key and data values
can be directly assigned constant values or values from a SAS data set. For
information about the hash and hash iterator object language elements, see
“Dictionary of Hash and Hash Iterator Object Language Elements” in SAS
Component Objects: Reference.
Java object
provides a mechanism that is similar to the Java Native Interface (JNI) for
instantiating Java classes and accessing fields and methods on the resultant objects.
For more information, see “Dictionary of Java Object Language Elements” in SAS
Component Objects: Reference.
logger and appender objects
enable you to record logging events and write these events to the appropriate
destination. For more information, see “Component Object Reference” in SAS
Logging: Configuration and Programming Reference.
The DATA step Component Interface enables you to create and manipulate these
component objects using statements, attributes, operators, and methods. You use the
DATA step object dot notation to access the component object's attributes and methods.
For detailed information about dot notation and the DATA step objects' statements,
attributes, methods, and operators, see the Dictionary of Component Language Elements
in SAS Component Objects: Reference.
Note: The DATA step component object statement, attributes, methods, and operators
are limited to those defined for these objects. You cannot use the SAS Component
Language functionality with these predefined DATA step objects.
Using the Hash Object
Why Use the Hash Object?
The hash object provides an efficient, convenient mechanism for quick data storage and
retrieval. The hash object stores and retrieves data based on lookup keys.
To use the DATA step Component Object Interface, follow these steps:
1. Declare the hash object.
2. Create an instance of (instantiate) the hash object.
3. Initialize lookup keys and data.
After you declare and instantiate a hash object, you can perform many tasks, including
Store and retrieve data.
Maintain key summaries.
Replace and remove data.
Compare hash objects.
Output a data set that contains the data in the hash object.
528 Chapter 24 Using DATA Step Component Objects

Get SAS 9.4 Language Reference, 6th Edition now with O’Reilly online learning.

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