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 (June 2000, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 28 Jun 2000 23:42:22 +0200
Reply-To:     Mauro Morandin <mauro.morandin@TISCALINET.IT>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Mauro Morandin <mauro.morandin@TISCALINET.IT>
Organization: Tiscali Spa
Subject:      R: SAS/Intrnet Question

Hi Craig,

1.) I have a slight improvement on the code suggested by News

try

Data _null_; file _webout; infile yourfile; /* your file */ /* input _text_ $200.; take that out */ put _infile_; /* change this */ run;

This should give you an advantage because it transfers one record at a time from the input buffer directly to the output buffer without loading the data into the PDV.

2.) Your

x 'cat "/home/craig/file.html"';

should be really fast, but it doesn't work with SAS/Intranet ! Hmmm ... have you set options noxwait; ???? Try it!

Ciao. Mauro Morandin

News <ctuck@roadrunner.nf.net> wrote in message 8j8grn$b84$1@nova.thezone.net... > I guess I should do some more benchmarking but the code you suggest is > exactly what I've been trying. However, in terms of 'web > speed', ie, waiting for the file to download to your browser, the 'x cat' > command seems quite alot faster. With SAS/Intrnet. the first data _null_ > output will download, then the screen will pause for a second of two before > the static html downloads. With the 'x cat' command, there's no delay. > Unless I'm missing something, I was just assuming that reading in a file > line by line and then outputting it seems to be a waste of resources when it > could just be copied to the output as the cat command produces. > > Instead of the datastep you have below, with the cgi method, I would use > something like: > > x 'cat "/home/craig/file.html"'; > > If this statement is preceeded by the following data _null_ code, it works > perfectly, but not with SAS/Intrnet. > > data _null_; > file stdout; > run; > > --Craig > > > GF wrote in message > <64P55.1842$_b3.83270@newsread1.prod.itd.earthlink.net>... > >I don't really understand what you mean by "really fast", but even the cgi > >program has to read the file line by line and write ro stdout. Using code > >like the following is going to be near as fast, since you already have > >incurred the overhead of loading SAS for the other two steps. > > > >Data _null_; > > file _webout; > > infile _infile; /* your file */ > > input _text_ $200.; /* or whatever */ > > put _text_; > >run; > > > > > > > >"News" <ctuck@roadrunner.nf.net> wrote in message > >news:8j88rl$6rd$1@nova.thezone.net... > >> I have a SAS program that sends output to the browser from different > >> sources. For instance, have a look at the following code. > >> > >> data _null_; > >> file _webout; > >> /* dynamic html code based on data */ > >> run; > >> > >> /* Here I'd like to output html code from a static html file */ > >> > >> data _null_; > >> file _webout; > >> /* dynamic html code based on data */ > >> run; > >> > >> The above three sections of code are used to create a single output file > >but > >> the piece in the middle is the problem. What is the fastest way to > include > >a > >> piece of static html text in the middle of this output? I can easily read > >it > >> in line by line and then output it but that seems to take too long. > Before > >> SAS/Intrnet was released I used a cgi program with stdout instead of > >_webout > >> and an x command like 'x cat "/file.html"' and this was extremely fast. > >But > >> this method won't work with SAS/Intrnet. Any suggestions? > >> > >> Thanks, > >> Craig Tuck > >> ctuck@dansys.com > >> > >> > >> > >> > >> > >> > > > > > >


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