Hi,
I need to import a .dat file that contains this information: FILE DAT
A PER: TEST0 1232156000002024-02-072024-02-07
A PER: TEST2 12345678000002024-02-072024-02-07
A PER: TEST3 XXXXXXXX000002024-02-072024-02-07
A PER: N° Fattura 575000002024-02-072024-02-07
and I use this code:
filename test "path/test.dat";
data test;
length
ONE $40.
TWO $5.
three $10.
four $10.
;
infile test ;
input;
ONE =ksubstr(_infile_,1 , 41 );
TWO =ksubstr(_INFILE_,41 , 5 );
three =ksubstr(_INFILE_,46 , 10 );
four =ksubstr(_INFILE_,56 , 10 );
run;
I have a problem on the last line for the character ° because sas truncates the last character in the first column (missing 5, Fattura 575 is correct)
How can I import the file correctly?
Thanks,
Luca
... View more