|
Sybernet / Supplied Procedures Reference
Release 3.00 Oct 14, 2002 |
|
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.
Procedure WRITELN
(
P000 VARCHAR2
, .. VARCHAR2
, P099 VARCHAR2
) ;
| Parameter | Description |
|---|---|
p000 |
A string. |
.. |
|
p099 |
A string. |
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.
The following example illustrates how to call write:
http.write('Hello World');
-----------------------------
Hello World
The following example illustrates how to call writeln:
http.writeln('Hello World');
-----------------------------
Hello World
The following example illustrates how to call write:
http.write
(
'Hello'
, chr(32)
, 'World'
) ;
-----------------------------
Hello World
The following example illustrates how to call writeln:
http.writeln
(
'Hello'
, chr(32)
, 'World'
) ;
-----------------------------
Hello
World
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