The SAS hash object is a feature in the SAS programming language that allows storage of a dictionary-like object in memory. Typically it is used to perform fast lookups when matching data between two different sets of data based on a common key (although it has many other uses).
Questions tagged [sas-hash]
4 questions
1
vote
1 answer
Look-up within same data and multiple variables with SAS hash
I have a dataset as can be generated with Below code.
data have;
infile DATALINES DLM='|' DSD MISSOVER ;
input (VarA VarB) ($) ord;
datalines;
YY|PP|3
XX|YY|2
|XX|1
|BB|1
BB|AA|2 …

Priyesh Sura
- 113
- 1
- 10
1
vote
2 answers
Dynamically define a SAS hash
So here is the problem.
I have a dataset and for each record, depending on a criteria, I want to load a different hash. I do not know the exact hash structure for each hash I will be loading during runtime. So I want to be able to execute the…

SAS2Python
- 1,277
- 5
- 16
1
vote
1 answer
Passing hash object as FCMP parameter
proc fcmp functions allow passing hash objects as parameters. The documentation is a little vague and it doesn't mention whether or not this ability is restricted to calls from other fcmp functions or if it's allowed from a data step call as…

Robert Penridge
- 8,424
- 2
- 34
- 55
0
votes
1 answer
SAS Hash Objects to track the history/relationships of ID changes across time
I have ID's as of today and the history of ID changes. I want to know what the ID most recent ID is and all the ID's associated with it at certain specified historical asof dates; and also have a count of the number of times the ID has changed.
The…

Reza
- 59
- 3