Previous Page | Next Page

Informats

$CHARw. Informat



Reads character data with blanks.
Category: Character

Syntax
Syntax Description
Details
Comparisons
Examples

Syntax

$CHARw.

Syntax Description

w

specifies the width of the input field.

Default: 8 if the length of the variable is undefined. Otherwise, the default is the length of the variable
Range: 1-32767

Details

The $CHARw. informat does not trim leading and trailing blanks or convert a single period in the input data field to a blank before storing values. If you use $CHARw. in an INFORMAT or ATTRIB statement within a DATA step to read list input, then by default SAS interprets any blank embedded within data as a field delimiter, including leading blanks.


Comparisons


Examples

input @1 name $char5.;

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