From 558ebaf6f20cfb57d46fdb603333757ca2008f73 Mon Sep 17 00:00:00 2001 From: munja Date: Wed, 6 Apr 2022 16:25:50 +0100 Subject: [PATCH] fix: avoid: ERROR: Variable "fref" may not be initialized --- all.sas | 1 + base/mp_dirlist.sas | 1 + 2 files changed, 2 insertions(+) diff --git a/all.sas b/all.sas index aa7d526..bcdf20d 100644 --- a/all.sas +++ b/all.sas @@ -4308,6 +4308,7 @@ run; data &out_ds; set &out_ds; length infoname infoval $60 fref $8; + if _n_=1 then call missing(fref); rc=filename(fref,filepath); drop rc infoname fid i close fref; if file_or_folder='file' then do; diff --git a/base/mp_dirlist.sas b/base/mp_dirlist.sas index 366ec99..4807b00 100644 --- a/base/mp_dirlist.sas +++ b/base/mp_dirlist.sas @@ -152,6 +152,7 @@ run; data &out_ds; set &out_ds; length infoname infoval $60 fref $8; + if _n_=1 then call missing(fref); rc=filename(fref,filepath); drop rc infoname fid i close fref; if file_or_folder='file' then do;