The output is determined using the informat used ($ w. Informat in your case, requested $1. In your code, so $1. Is, first of all, the definition of an informant, the definition of the length of a variable is a byproduct of this).
Use $ char. informat for the desired result.
data output1; input @1 a $char1. @2 b $char1. @3 c $char1.; datalines; !.. 1.3 ; run;
From the documentation:
$ w Informat $ W. informat aligns leading spaces and aligns the values ββto the left before saving text. Also, if the field contains only spaces and one period, $ w. converts a period to empty because he interprets this period as a missing value. $ W. informat treats two or more periods in a field as character data.
$ CHARw. inform $ CHARw. informat does not trim leading and trailing spaces or does not convert one period in the input data field to a space before storing values.
source share