Date: Thu, 25 Mar 1999 01:08:47 GMT
Reply-To: LPogoda <lpogoda@AOL.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: LPogoda <lpogoda@AOL.COM>
Organization: AOL http://www.aol.com
Subject: Re: How can SAS read character variables containing many blanks?
I think we need to see some code. You **should** be able to do something along
the lines of:
INPUT @1 FIE $CHAR20.;
The $charX formats preserve leading spaces - if your data have none, you can
use $20. instead.
You don't say what platform you're on. The above will work on a mainframe
against a fixed format file, or on a PC or UNIX box where ALL records in the
file are at **least** 20 bytes long.
If that's not the case, you'll need to modify the INFILE statement to read
INFILE 'FOO' LRECL = 20 PAD; or use the MISSOVER or STOPOVER options - see your
If none of the above quite fits your situation, we need to see some code.
In article <36F96659.E9E6EE2F@merck.com>, Kevin Maro
>I have a simple question on read char variables:
>How can I read character variables containing 2 or more consecutive
>For example, I have a flat file of one character variable and 4 records
>ABC DE FG
>ABC DE FG
>If I use $20. or $char20. or & $20, I either get all blanks, or ABC for
>all records. Could anyone give me some advice?