LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 1999, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
In-Reply-To:  <>

John Whittington <> writes >At 23:48 08/03/99 +0000, Peter Crawford wrote (in part): > >>If it is an external text file, try this approach >> >>data _null_; >> infile "<big external file>" flowover lrecl=lrec; >> file "<small external>" lrecl=lrec; >> input @'spflog' ; >> put _infile_; >>run; > >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? > >Regards, > >John > >----------------------------------------------------------------

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_; 145 run;

NOTE: The infile "C:\business\data\sas\" is: FILENAME=C:\business\data\sas\, RECFM=V,LRECL=32767

NOTE: The file "corefound" is: FILENAME=C:\business\data\sas\corefound, RECFM=V,LRECL=32767

NOTE: 233 records were read from the infile "C:\business\data\sas\". 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 extracted records.

Has anyone the answer ? -- Peter Crawford

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