29%macro mf_readfile(fpath
31%local fref rc fid fcontent;
34%
if %sysfunc(filename(fref,&fpath)) ne 0 %then %
do;
36 %put %str(ERR)OR: %sysfunc(sysmsg());
40%let fid=%sysfunc(fopen(&fref,I));
43 %put %str(ERR)OR: %sysfunc(sysmsg());
47%
if %sysfunc(fread(&fid)) = 0 %then %
do;
48 %let rc=%sysfunc(fget(&fid,fcontent,65534));
59%let rc=%sysfunc(fclose(&fid));
60%let rc=%sysfunc(filename(&fref));