Reads standard character data.
Category: |
Character
|
Alias: |
$Fw.
|
-
w
-
specifies the width of the input field.
You must specify w because SAS does not supply
a default value.
The $w. informat
trims leading blanks and left aligns the values before storing the text.
In addition, if a field contains only blanks and a single period, $w. converts the period to a blank because it interprets the
period as a missing value. The $w. informat
treats two or more periods in a field as character data.
The $w.
informat is almost identical to the $CHARw. informat.
However, $CHARw. does not trim leading blanks
nor does it convert a single period in an input field to a blank, while $w. does both.
input @1 name $5.;
Data Line |
Results* |
----+----1
|
|
XYZ
|
XYZ##
|
XYZ
|
XYZ##
|
.
|
|
X YZ
|
X#YZ#
|
*
The character # represents a blank space. |
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.