Date: Tue, 25 Jan 2000 14:39:24 +0100
Reply-To: detecsm_hellriegelg@WESTLB.DE
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Gehard Hellriegel <detecsm_hellriegelg@WESTLB.DE>
Subject: Re: INPUT problem
Content-type: multipart/mixed;
Boundary="0__=9bY33GZ95HDyCJc0yIG7QEsp3g1s9T0giax1WbRPHi6YEJ80Rm3wU6AD"
Hi,
you should use the informat $char78. for reading:
data _test_;
length text $100;
infile 'test.dat' dlm='!';
input text: $char78.;
run;
Josef Müller <mullerj@TUNW.UPOL.CZ> on 25.01.2000 13:05:36
Bitte antworten an "mullerj@tunw.upol.cz" <mullerj@tunw.upol.cz>
An: SAS-L@LISTSERV.UGA.EDU
Kopie: (Blindkopie: DeTeCSM HellriegelG/D/ExternalStaff/WLB)
Thema: INPUT problem
Hello,
I have a folowing problem:
I need to read a records from external file and I use this syntax:
data _test_;
infile 'path' dlm='!';
input text:78;
run;
The external file has this structure:
each rows is ended by sign !
maximal length of each row is 78 characters
But my problem is:
If I use the programm as above, and I have a space on the first position in some
row, the resulting observation is without this space...
For example i have this part of external file:
1987154 2 0 0 0 0 0 1 1 5 7 17 21 46 10385 12!
6 165 184 !
1988154 2 0 0 0 0 0 1 3 7 12 16 33 67 82117 98!
198 211 !
First three rows are read succesfully, but the fourth row is read as " 198
211 "
Thanks a lot for a quick help.
Hi, Josef
Mit freundlichen Gruessen
DeTeCSM, Gerhard Hellriegel
WestLB
Abteilung: 001-80622
Aderstr. 22
D - 40217 Duesseldorf
Tel.: +49211 826 6173
Fax: +49211 826 5393