/* Richard A. DeVenezia * SUGI 29 - "Greetings from the Edge" * www.devenezia.com/papers */ %*------------------------------------------------; %macro startServer ( policy= , title=Hash Server , define= ); %local restore; %let restore = %sysfunc(getoption(xsync)) %sysfunc(getoption(xwait)) %sysfunc(getoption(xmin)) ; options noxsync noxwait xmin; x start "&title" java -Djava.security.policy=&policy &define HashServer ; %put sysrc = &sysrc; options &restore; %mend; %*------------------------------------------------; %macro getHashHandle (size=100, load=0.75, handle_mv=); data _null_; declare javaobj ji ("DataStepHashAdapter"); ji.callIntMethod ("getHashHandle",&size,&load,handle); ji.delete(); put "Hash allocated, " handle=; call symput ("&handle_mv", trim(left(put(handle,best12.)))); run; %mend; %*------------------------------------------------; %macro freeHashHandle (handle=); data _null_; declare javaobj ji ("DataStepHashAdapter"); ji.callVoidMethod ("freeHashHandle", &handle); ji.delete(); run; %mend;