17 %macro mf_getkeyvalue(key,libds=work.mp_setkeyvalue
    19  %local ds dsid key valc valn type rc;
    20 %let dsid=%sysfunc(open(&libds(where=(key=
"&key"))));
    22 %let rc = %sysfunc(fetch(&dsid));
    23 %let rc = %sysfunc(
close(&dsid));
    25 %
if &type=N %then %
do;
    28 %
else %
if &type=C %then %
do;
    31 %
else %put ERROR: Unable to find key &key in ds &libds;