All output that
is created by Application Dispatcher programs must contain an abbreviated
HTTP header. This header is everything from the beginning of the output
up to the first null line. Here is some example output, including
the header:
Content-type: text/html
Pragma: nocache
<HTML>
<HEAD><TITLE>Application Server Administrative Program</TITLE></HEAD>
<BODY>
<H1>Administrative Program</H1>
<P>The application server has been shut down.</P>
<HR>
</BODY>
</HTML>
In this example, the HTTP header contains two lines.
The minimal requirements for Application Dispatcher output are that
the header contain
Content-type
or
Location
. The null line that terminates the HTTP header
is important. You can create the null line with a PUT statement:
put ;
This, however, is incorrect
because it produces a line containing one blank followed by carriage
control:
put " ";
A line with one blank
is not a null line and is not recognized as terminating the header.
The output that follows
the HTTP header depends on the content type. If Location is used,
then no output follows the header because this header triggers the
Web browser to redirect to another page. The most common type of output
is, of course, HTML. The HTML source for the Web page follows the
header when the content type is
text/html
.
No matter whether the program output
is plain text, binary graphics, HTML code, or any other content type,
all output intended for the Web browser should be sent to the fileref
_WEBOUT. This special fileref is actually a TCP/IP socket connection
to the Application Broker. Sending output to this socket streams it
back to the Web browser. The socket is like a pipe through which data
flows. Because it behaves in this way, the fileref _WEBOUT is in a
permanent append mode. It is not possible to write something to _WEBOUT
and then reopen the fileref and overwrite the previous output. It
all gets appended. Therefore, the
mod
parameter
should not be used (and is not allowed) in any FILE _WEBOUT statements.
Before Version 7 of SAS, an additional fileref _GRPHOUT was necessary
on
z/OS systems because of translation issues from EBCDIC to ASCII.
The two filerefs _GRPHOUT and _WEBOUT were synonyms on all hosts except
for
z/OS under Version 6 of SAS. In SAS, Version 7 and later, these
two filerefs are synonyms for all platforms including
z/OS. Though
no longer needed, the fileref _GRPHOUT is still present for compatibility
reasons.