Not sure if this is what you are looking for, but you can always use an extra data step to identify the maximum length of your variable. The following code would capture the string (and its length) even if the string included a space or multiple spaces:
filename FT15F001 temp;
data _null_;
infile FT15F001 end=eof;
retain maxl;
input;
maxl=max(maxl,lengthn(_infile_));
if eof then call symput('maxl',maxl);
parmcards;
12324564lkahrl i3q2hi.
12324564lkahrli3q2hi.ab cdefghijklmnop
1234
12324564lkahrli 3q2hi.abc defghijklmnopqrstuvwxyz
abcd efg
;;;;
data count;
length a $&maxl.;
input;
total = lengthn(_infile_);
a=_infile_;
datalines;
12324564lkahrl i3q2hi.
12324564lkahrli3q2hi.ab cdefghijklmnop
1234
12324564lkahrli 3q2hi.abc defghijklmnopqrstuvwxyz
abcd efg
;
Art, CEO, AnalystFinder.com
... View more