Date: Mon, 3 Feb 1997 17:08:43 +0500
Reply-To: Bernard Tremblay <bernard@CAPITALE.QC.CA>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Bernard Tremblay <bernard@CAPITALE.QC.CA>
Subject: Re: Determining record length in inputs
Hi,
Try the options "length=var" on the infile statement.
Example:
data example;
infile test length=nb ;
input record $varying200. nb ;
run;
NB: length greater than 200 have to be handled by your program too...
Hope it helps,
Bernard Tremblay
\\\|///
\\ - - //
( @ @ )
+------oOOo-(_)-oOOo----------+---------------------------------+
| Bernard Tremblay | |
| La Capitale | Tel: (418) 646-2401 |
| | Fax: (418) 646-5960 |
| | Int: bernard@capitale.qc.ca |
+-----------------------------+---------------------------------+
| Imaginasys enr | Res: (418) 878-4447 |
| | Int: bertrem@quebectel.com |
+---------------Oooo----------+---------------------------------+
oooO ( )
( ) ) /
\ ( (_/
\_)
>>>From owner-sas-l@UGA.CC.UGA.EDU Mon Feb 3 16:39 EST 1997
>>>Mime-Version: 1.0
>>>Content-Transfer-Encoding: 7bit
>>>Date: Mon, 3 Feb 1997 14:55:31 -0600
>>>From: Hays McLean <Hmclean@PEACH.FRUIT.COM>
>>>Subject: Determining record length in inputs
>>>To: Multiple recipients of list SAS-L <SAS-L@UGA.CC.UGA.EDU>
>>>
>>>Is there a way that SAS can predetermine the length of a record so that
>>>the whole record can be read in as a character variable with format
>>>$XXX. where XXX is the record length? This would be used on variable
>>>record length text files where each record may be different length.
>>>
>>>Thanks for any help.
>>>
>>>--Hays McLean