Converts blanks to 0s.
-
w
-
specifies the width of the input field.
-
d
-
specifies the power of 10 by which to divide
the value. If the data contain decimal points, the d
value is ignored. This argument is optional.
The BZw.d informat reads numeric values, converts any trailing or
embedded
blanks to 0s, and ignores leading blanks.
The BZw.d informat can read numeric values that are located anywhere
in the field. Blanks can precede or follow the numeric value, and a minus
sign must precede negative values. The BZw.d informat ignores blanks between a minus sign and a numeric
value in an input field.
The BZw.d informat interprets a single period in a field as a 0. The
informat interprets multiple periods or other nonnumeric characters in a field
as a missing value.
To use BZw.d in a DATA step with list input, change the delimiter for
list input with the DLM= or DLMSTR= option in the INFILE statement. By default,
SAS interprets blanks between values in the data line as delimiters rather
than 0s.
The BZw.d informat converts trailing or embedded blanks to 0s. If
you do not want to convert trailing blanks to 0s (for example, when reading
values in E-notation), use either the w.d informat or the Ew.d informat
instead.
input @1 x bz4.;
Data Line |
Result |
----+----1
|
|
34
|
3400
|
-2
|
-200
|
-2 1
|
-201
|
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.