Date: Tue, 9 Mar 1999 09:26:00 +0000
Reply-To: Peter Crawford <Peter@CRAWFORDSOFTWARE.DEMON.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Peter Crawford <Peter@CRAWFORDSOFTWARE.DEMON.CO.UK>
Subject: Re: extracting spflog from dataset
John Whittington <firstname.lastname@example.org> writes
>At 23:48 08/03/99 +0000, Peter Crawford wrote (in part):
>>If it is an external text file, try this approach
>> infile "<big external file>" flowover lrecl=lrec;
>> file "<small external>" lrecl=lrec;
>> input @'spflog' ;
>> put _infile_;
>Peter, am I mistaken in thinking that would result in loss of all of the
>contents of a *wanted* observation prior to the 'spflog' phrase?
As I understand input processing, yes you are mistaken !
Have you tried it ?
The data step should hold the current infile buffer until the input
following an input without a trailing @ sign.
Have you tried it ?
So -shame on me- it doesn't work, because the lrecl option needs a
number and won't take a variable name. I'm ever, too hopeful !
I was trying to ensure that any input record was guaranteed space in the
output buffer. I had presumed I could copy lrecl value in that way.
There is a limit of 32k on the output buffer linesize.
The following code works for input records up to 32k
139 %let config= %sysfunc( getoption( config ));
140 data _null_;
141 infile "&config" ls=32767 flowover ;
142 file "corefound" ls=32767 ;
143 input @'core' ;
144 put _infile_;
NOTE: The infile "C:\business\data\sas\config.ts045.sas" is:
NOTE: The file "corefound" is:
NOTE: 233 records were read from the infile
The minimum record length was 0.
The maximum record length was 81.
NOTE: 12 records were written to the file "corefound".
The minimum record length was 29.
The maximum record length was 44.
NOTE: The DATA statement used 0.05 seconds.
On this platform win95, LRECL would allow numbers greater than 32k, to
be defined, but short of two passes through the input, I don't know of a
foolproof source for the value necessary to guarantee accomodating the
Has anyone the answer ?