52%
if not(%eval(%unquote(&iftrue))) %then %
return;
55%let keyvar=%mf_getuniquename();
56%let prevkeyvar=%mf_getuniquename();
57%let lastvar=%mf_getuniquename();
59%
if %mf_getattrn(&libds,NLOBS)=0 %then %
do;
62 hashkey=put(md5(
"&salt"),$hex32.);
66 %put &sysmacroname: Dataset &libds is empty, or is not a dataset;
67 %put &sysmacroname: hashkey of &outds is based on salt (&salt) only;
69%
else %
if %mf_getattrn(&libds,NLOBS)<0 %then %
do;
70 %put %str(ERR)OR: Dataset &libds is not a dataset;
73 data &outds(rename=(&keyvar=hashkey) keep=&keyvar)
74 %
if "%substr(&sysver,1,1)" ne
"4" and
"%substr(&sysver,1,1)" ne
"5" %then %
do;
78 length &prevkeyvar &keyvar $32;
80 if _n_=1 then &prevkeyvar=put(md5(
"&salt"),$hex32.);
81 set &libds end=&lastvar;
84 cvars=%mf_getvarlist(&libds,typefilter=C) &prevkeyvar,
85 nvars=%mf_getvarlist(&libds,typefilter=N)
88 if &lastvar then output;