Previous Page | Next Page

Informats

$w. Informat



Reads standard character data.
Category: Character
Alias: $Fw.

Syntax
Syntax Description
Details
Comparisons
Examples

Syntax

$w.

Syntax Description

w

specifies the width of the input field. You must specify w because SAS does not supply a default value.

Range: 1-32767

Details

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.


Comparisons

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.


Examples

input @1 name $5.;

Data Line Results*
----+----1

XYZ
XYZ##
 XYZ
XYZ##
  .

 X YZ
X#YZ#
* The character # represents a blank space.

Previous Page | Next Page | Top of Page