1
0
mirror of https://github.com/sasjs/core.git synced 2026-07-23 15:35:29 +00:00

fix: ensure leading blanks are always imported

This commit is contained in:
4gl
2026-07-22 16:29:18 +01:00
parent e104f0722d
commit e24ef4c6fc
7 changed files with 83 additions and 7 deletions
+8 -2
View File
@@ -104,7 +104,10 @@
data _null_;
infile "%sysfunc(pathname(work))/&table..csv" termstr=crlf ;
input;
if _n_=1 then call symputx('input_statement',_infile_);
/* a plain $ informat strips leading blanks - use $char instead */
if _n_=1 then call symputx('input_statement'
,prxchange('s/:\$(?=[0-9 ])/:\$char/i',-1,_infile_)
);
list;
data work.&table;
infile "%sysfunc(pathname(work))/&table..csv" firstobs=2 dsd
@@ -124,7 +127,10 @@
data _null_;
infile indata termstr=crlf lrecl=32767;
input;
if _n_=1 then call symputx('input_statement',_infile_);
/* a plain $ informat strips leading blanks - use $char instead */
if _n_=1 then call symputx('input_statement'
,prxchange('s/:\$(?=[0-9 ])/:\$char/i',-1,_infile_)
);
%if %str(&_debug) ge 128 %then %do;
if _n_<20 then putlog _infile_;
else stop;