Date: Tue, 4 Nov 1997 11:51:27 -0500
Reply-To: MICHAEL.RAITHEL@RAITHM49.CUSTOMS.SPRINT.COM
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: "Michael A. Raithel" <MICHAEL.RAITHEL@RAITHM49.CUSTOMS.SPRINT.COM>
Subject: Re: SAS/IntrNet - writing to _WEBOUT -- A LATE Answer
In a thread that is colder than the North Face of the Eiger, Bernd
Steinmetz posted the following:
>I have a test-setinit for SAS/IntrNet. Everthing is working fine as
>long as I use the default SAS macros to produce the HTML output. If I
>want to produce the HTML file using my own programs/macros, I have to
>write to the file "IP-adress:4049". This file is associated with
>fileref _WEBOUT. For the following code I received a error message
>saying that the "SAS program did not produce a valid HTTP header
>....." :
>
>data _null_;
>file _webout;
>put '<HTML><HEAD><TITLE>IMOS Consulting';
>put '</TITLE></HEAD><BODY><H1>IMOS Consulting</H1>'; put
>'</BODY></HTML>';
>put '<a
>href="http://home.t-online.de/home/imos_consulting"</a>';
>run;
>
>I tried to append _WEBOUT using code like this:
>
>data _null_;
>file _webout mod;
>put '<p>Swiss SAS programmers wanted !</p>';
>run;
>
>but using the option MOD is not allowed for fileref _WEBOUT.
>
>Muchos gracias for any answer.
>
Bernd, I certainly hope that you have your answer by now, but I did
not come across it in the "mound" of SAS-L postings that I just waded
through... (having just returned from a very pleasant 2-week hiatus).
I have written a SAS/IntrNet application that *DOES* write HTML out to
_WEBOUT. Your code looks fine, except that it is missing the
following PUT statement.
put 'Content-type: text/html';
The PUT statement, above, should preceed your other PUT statements.
Here is an entire example, of mine, for the sake of completeness:
put 'Content-type: text/html';
put;
put '<HTML><HEAD>';
put '<TITLE>DATE INPUT ERROR</TITLE>';
put '</HEAD><BODY>';
put '<H1>ERROR!</H1>';
put '<p>';
put '<H2>Your <I>FROM</I> date must be less than
your<I>TO</I>date!</H2>';
put '<p>';
put '<H2>You chose the following values:</H2>';
put '<p>';
put "<H2>fromdate= &fromdate</H2>";
put '<p>';
put "<H2> todate= &todate</H2>";
put '<p>';
put '<H3>Please click on BACK, correct the date range, and try
again!</H3>';
put '<p>';
put '</BODY></HTML>';
Bernd, you were close to the summit on this one. Good luck as you
continue your climb to SAS/IntrNet application success!
I hope that this suggestion proves helpful now, and in the future!
Of course, all of these opinions and insights are my own, and do not
reflect those of my organization or my associates.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Michael A. Raithel
"The man who wrote the book on performance"
E-mail: maraithel@mcimail.com
Author: Tuning SAS Applications in the MVS Environment
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Because it is there!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++