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:
+8
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user