As featured in:
Data Management Solutions Using SAS Hash Table Operations: A Business Intelligence Case Study
, and built from this
github repository
.
Chapter 3 Direct Explicit Assigned Retrieve.sas
1
/* "Chapter 3 Direct Explicit Assigned Retrieve.sas" from the SAS Press book
2
Data Management Solutions Using SAS Hash Table Operations:
3
A Business Intelligence Case Study
4
*/
5
6
data _null_ ;
7
dcl hash H (multidata:
"Y"
) ;
8
H.definekey (
"K"
) ;
9
H.definedata(
"D"
) ;
10
H.definedone() ;
11
do
K = 1, 2, 2 ;
12
q + 1 ;
13
D = char (
"ABC"
, q) ;
14
H.add() ;
15
end ;
16
D =
"X"
; *pre-call value of PDV host variable D;
17
RC = H.FIND(KEY:1) ;
18
put D= RC= ;
19
run ;
Generated by
For more information visit the
Bizarro Ball library
.