Date: Thu, 13 Jan 2000 14:38:34 -0000
Reply-To: andy blissett <firstname.lastname@example.org>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: andy blissett <andy.blisset@ROYALMAIL.CO.UK>
Organization: royal mail
Subject: Data step- Length of records
When I read in a file into SAS or out from SAS the LRECL parameter always
appears to be incorrect. When I work with Files that are variable length
with no miximum limit, how do I output the file.
For example if I has a file called test then the code may look like this
I'll explain what ZZZZZZ means
infile 'c:\test' ZZZZZZZ
input @1 var1 $char1. @2 $char2.;
if var1=var2 then do;
file 'c:\testout' ZZZZZZZ;
If the file is a CSV then the record length is rarely quoted. It may in
this exmaple be 500.
Therefore I could change ZZZZZZ to lrecl=500;
I do not want to guess the record length as being a large number, because
now and again a record may be longer. What would people recommmend? should
I just increase the LRECL to something like 30000. Or is there an option
similar to Lrecl=max???