Syntax, DECLARE statement:
DECLARE object object-name(<argument_tag-1:value-1,
...>);
object
specifies the component
object. An object can be one of the following values:
hash
indicates a hash object.
hiter
indicates a hash iterator
object.
object-name
specifies the name
of the hash object.
argument_tag-1
specifies the information
that is used to create an instance of the component object.
DATASET: 'data-set-name <(data-set-option)>'
value
specifies the value
for an argument tag. Valid values depend on the component object.
|
declare hash States();
declare hash States(dataset:'work.population_usstates (where=(StatePop2017>20000000))');
declare hash ContName(MULTIDATA:'YES');
Steps
|
Syntax
|
Example
|
---|---|---|
Declare the hash object.
|
DECLARE object object-name (<argument_tag-1:value-1, ...>); |
declare hash ContName(); |
Define the hash object.
|
object-name.DEFINEKEY('key-1' <, ...'key-n'>); |
ContName.definekey('ContinentID'); |
object-name.DEFINEDATA('data-1' <, ...'data-n'>); |
ContName.definedata('ContinentName'); |
|
object-name.DEFINEDONE( );
|
ContName.definedone(); |
|
Use the hash object.
|
object-name.FIND(<KEY:value-1, ... KEY:value-n>); |
rc=ContName.find(); |