Reputation: 31
I want to validate a dataset which has 100 variables and over 100000 records. I am importing data in string form (even for the numeric data). I observed some variables getting truncated in the end. How do I validate each variable to make sure that the data populated totally (not truncated)?
Sample data:
data dsn;
infile "xyz.txt" dlm= '|' RECFM=V LRECL=2000 PAD MISSOVER;
length
a1 $20.
a2 $100.
a3 $50.
;
input a1 $
a2 $
a3 $
;
run;
For example the string value is 1532564.7564 and I am getting 1532564.756 after my import. So, My question is this is the value that got is getting truncated. But, when I change it to numerical data then I would get the full value. Like wise, Licnum is character data (eg:12xd456) and this is getting truncated in the last digit ( shows up as12xd4).
Upvotes: 0
Views: 293
Reputation: 27508
Try these adjustments
LRECL
$
length of the variable getting clipped.1532564.7564
is 12 characters and won't fit in a variable that is $11.
$<n>.
format are not longer than <n>
attrib Licnum length=$7 format=$5.
then only the first five characters will be seen when the data is viewed.Upvotes: 3