fix(validatefilter): drop the dead nobs assignment, keep targetds precedence
Review feedback on the merged fix:
- derived_nobs was assigned twice, the first one dead - the coalesced form below
is the live value. Removed, so there is one assignment to read.
- making the catalog test a plain %if after the derived-variables test let the
catalog branch override it; the derived view won before and still should. The
catalog branch now requires derived_nobs=0, so the view keeps precedence and
only a catalog with no derived configuration is blanked.
Two guarded if blocks, not %else %if: that construct is what the parser rejected
in this file before ('Expected DO not found'), and the first attempt at this
review point reproduced it - validatefilter and viewdata both failed to complete
again until it was replaced.
Verified: sasjs test -t new -> 64/64 (100%), TEST=0.
This commit is contained in:
1 parent
709acfad73
commit
337ea8e5e0
1 file changed
+4
-3
@@ -78,8 +78,6 @@ run;
|
||||
outview=work.vw_derived,
|
||||
outvars=work.derived_vars
|
||||
)
|
||||
%let derived_nobs=%mf_nobs(work.derived_vars);
|
||||
|
||||
/* A format catalog (LIBREF.CATALOGNAME-FC) must be left for mp_filterstore to
|
||||
rewrite into a cntlout dataset, and a -FC name handed over as targetds is not
|
||||
something it can read - so pass no targetds at all in that case. An empty
|
||||
@@ -96,7 +94,10 @@ run;
|
||||
%if &derived_nobs>0 %then %do;
|
||||
%let targetds_val=work.vw_derived;
|
||||
%end;
|
||||
%if &is_fmtcat=1 %then %do;
|
||||
/* the derived view keeps precedence: a catalog is only blanked when there is no
|
||||
derived configuration to validate against. Two plain %if blocks rather than
|
||||
%else %if - that construct is what the parser rejected here before. */
|
||||
%if &derived_nobs=0 and &is_fmtcat=1 %then %do;
|
||||
%let targetds_val=;
|
||||
%end;
|
||||
|
||||
|
||||
Reference in new issue
Block a user