26%macro mf_getvalue(libds,variable,filter=1,fetchobs=1
30 %let dsid=%sysfunc(open(&libds(where=(&filter))));
31 %
if (&dsid) %then %
do;
34 %let rc = %sysfunc(fetchobs(&dsid,&fetchobs));
35 %
if (&rc ne 0) %then %
do;
36 %put NOTE: Problem reading obs &fetchobs from &libds..;
37 %put %sysfunc(sysmsg());
41 %
if &rc eq -1 %then %let rc = 4;
43 %let syscc = %sysfunc(max(&syscc,&rc));
45 %let rc = %sysfunc(close(&dsid));
51 %put %sysfunc(sysmsg());
52 %let syscc = %sysfunc(max(&syscc,%sysfunc(sysrc())));