Sybernet / Supplied Procedures Reference
Release 3.00
Oct 14, 2002
backwards forwards

HTTP.WRITE

WRITE and WRITELN are the two procedures you will use to send output to Sybernet. Output is done asynchronously, even while your stored procedure is still executing. This means you do not have to wait for your stored procedure to complete before output is received, nor are you limited to at most 1,000,000 characters. While these limitations exist with Oracle's DBMS_OUTPUT package, no such limits are imposed by Sybernet.

Both procedures accept as many as 100 parameters. Each parameter may be as large as 32,767 characters, but the total number of characters in all parameters may not exceed 32,767. WRITE and WRITELN rely on Oracle's ability to implicitly convert numeric and date values to strings. Most of the time this is completely acceptable. Sometimes you may need to format these datatypes yourself.

As its name implies WRITELN differs from WRITE because each non-null parameter is appended with a new-line character. To do this means WRITELN is not as efficient as WRITE, and in fact it is recommended that you insert your own new-line characters when you call WRITE.

Syntax

Procedure WRITE
(
    P000                          VARCHAR2
,   ..                            VARCHAR2
,   P099                          VARCHAR2
)   ;

Parameters

Parameter Description
p000
 
A string.
..
 
 
p099
 
A string.


Examples

The following examples assume you are in preformatted mode so as to illustrate what the output actually looks like. HTML normally ignores white space, but not always. White space inside of URL's, for example, should probably be escaped.


Example 1

The following example illustrates how to call write:

http.write('Hello World');



-----------------------------
Hello World

Example 2

The following example illustrates how to call writeln:

http.writeln('Hello World');



-----------------------------
Hello World

Example 3

The following example illustrates how to call write:

http.write
(
    'Hello'
,   chr(32)
,   'World'
)   ;



-----------------------------
Hello World

Example 4

The following example illustrates how to call writeln:

http.writeln
(
    'Hello'
,   chr(32)
,   'World'
)   ;



-----------------------------
Hello
 
World

Example 5

The following example produces the same results as Example 4 but (because it uses write instead of writeln) is more efficient:

http.write
(
    'Hello'
,   chr(10)
,   chr(32)
,   chr(10)
,   'World'
)   ;



-----------------------------
Hello
 
World



Sybernet is a trademark of SRI International.
Copyright © 1996-2009 SRI International. All Rights Reserved.
Denis D. Workman / http://Sybernet.sri.com/