Chapter Contents

Previous

Next
$CHARw.

$CHARw.



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 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 Lines Results*
----+----1

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


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.