LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (February 1997, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 3 Feb 1997 17:31:00 EST
Reply-To:     "Peng, Haiou" <PENGH01@IMSINT.COM>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         "Peng, Haiou" <PENGH01@IMSINT.COM>
Subject:      Re: Determining record length in inputs
Comments: To: Hays McLean <Hmclean@PEACH.FRUIT.COM>

Try to do this:

data test; infile '......' length=lg; varlen=lg; input your_var $varying200. varlen; run;

You should know the maximum length of records in your file. In this case I assume it be 200. You may need to use LRECL= options in your INFILE statement, depending on your operating system. You can run the data step without LRECL= option, and see what the default value is from the sas log. If the value is less than the maximum length of the record, you need to define your logical record length.

Haiou ---------- From: Hays McLean To: Multiple recipients of list SAS-L Subject: Determining record length in inputs Date: Monday, February 03, 1997 2:55PM

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


Back to: Top of message | Previous page | Main SAS-L page