Date: Wed, 6 Nov 2002 20:19:23 GMT
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Organization: Cornell University
Subject: Re: input problem | text block | single variable
On Wed, 06 Nov 2002 19:21:17 GMT, evan.cooch@NOSPAMcornell.edu wrote:
>On 6 Nov 02 19:04:36 GMT, Brian.Shilling@ASTRAZENECA.COM (Shilling,
>>If you know the maximum length, you can try something
>> infile '<filename>'
>> format raw_name $varying801.;
>> informat raw_name $varying801.;
>> input raw_name $;
>>You could replace the 801 with the length of the entire string.
>Worth a try - fuynny, but after 20+ years of using SAS, this is the
>first time I've ever had to input data of this sort.
Above doesn't work.
Consider the following code (derived from above):
infile cards MISSOVER DSD LRECL=32767;
format fragment $varying154.;
informat fragment $varying154.;
input fragment $;
This still gives me 2 records for the variable fragment. I want
fragment to simply be
I've tried using TRUNCOVER, but that doesn't work either.
But, if I do
length fragment $40 frag1 $20 frag2 $20;
input #1 frag1 $
#2 frag2 $;
it works fine. The problem is, its cumbersome, especially since the
actual fragment I need to build this way is 24,00 characters long, and
is split over ~ 600 lines in the data file.