1
0
mirror of https://github.com/sasjs/core.git synced 2026-01-08 01:50:05 +00:00

fix: ensuring obs is updated when the table has zero columns

This commit is contained in:
Allan Bowe
2021-05-26 23:35:25 +03:00
parent 1cc9213467
commit ce331a23c8

View File

@@ -102,7 +102,8 @@
%let fmtds=%scan(&syslast,2,.); %let fmtds=%scan(&syslast,2,.);
/* prepare formats and varnames */ /* prepare formats and varnames */
data _null_; data _null_;
set &fmtds end=last; if _n_=1 then call symputx('nobs',nobs,'l');
set &fmtds end=last nobs=nobs;
name=upcase(name); name=upcase(name);
/* fix formats */ /* fix formats */
if type=2 or type=6 then do; if type=2 or type=6 then do;
@@ -128,7 +129,6 @@
call symputx(cats('len',_n_),newlen,'l'); call symputx(cats('len',_n_),newlen,'l');
call symputx(cats('fmt',_n_),fmt,'l'); call symputx(cats('fmt',_n_),fmt,'l');
call symputx(cats('type',_n_),type,'l'); call symputx(cats('type',_n_),type,'l');
if last then call symputx('nobs',_n_,'l');
run; run;
data &fmtds; data &fmtds;
/* rename on entry */ /* rename on entry */