CORE
mf_getkeyvalue.sas
Go to the documentation of this file.
1 
19 %macro mf_getkeyvalue(key,libds=work.mp_setkeyvalue);
20  %local ds dsid key valc valn type rc;
21 %let dsid=%sysfunc(open(&libds(where=(key="&key"))));
22 %syscall set(dsid);
23 %let rc = %sysfunc(fetch(&dsid));
24 %let rc = %sysfunc(close(&dsid));
25 
26 %if &type=N %then %do;
27  &valn
28 %end;
29 %else %if &type=C %then %do;
30  &valc
31 %end;
32 %else %put ERROR: Unable to find key &key in ds &libds;
33 %mend;