SUBSCRIBE SAS-L Stephane wrote:
> Good morning,
> I take advantage of the situation to put an another question. I was
> developping this part of the program when the IT staff proposed to me
> to send me the data through a pointer instead of sending me a flat
> file. The application is based on a UNIX server and I receive datas
> onto a PC.
> I sometimes use the interface between C/dll and SAS so I think
> it’s a good idea because the server application hasn’t to
> write a flat file somewhere but :
> * I noted that the peek function support a length of 32k and, as you
> can see, I usually receive very big file.
> * The place into memory for this kind of pointer will be very
> important and will decrease performances.
> Does the alternative is profitable ?
> What is the method to receive a pointer with a size of 32+k ? ? ?
For you, at this point, a pointer alternative is not profitable.
You will have the same issues you have now trying to break things apart.
A pointer points to one place, peekc returns upto 32k of characters found at
If the data file truly has line lengths greater than 1mb, you will have to
crack some books, learn about recfm=N and do some of your own 'chunking' to
break the line into 32k pieces that can pumped into _infile_ and read using
input. You will have to do your own end of line detection because is
recfm=N, N stands for None. On some systems you might run into a 2GB limit
when trying to control input position via @.
What kind of data is being written to the text files ? Perhaps there is a
better way to communicate the information. Perhaps your IT staff knows
about XML and can provide the data in such a form (then you would not need
to input it all, SAS has an engine that lets you use an XML files as if it
were a table)
Richard A. DeVenezia