$Web Output Content: Difference between revisions
m (1 revision) |
mNo edit summary |
||
Line 2: | Line 2: | ||
<span class="pageSubtitle"><section begin="desc" />Retrieve current output stream<section end="desc" /></span> | <span class="pageSubtitle"><section begin="desc" />Retrieve current output stream<section end="desc" /></span> | ||
$Web_Output_Content retrieves the current contents of the ''[[Janus Web Server]]'' output stream as a longstring. | |||
$Web_Output_Content takes a single optional argument and returns a longstring. | |||
==Syntax== | ==Syntax== | ||
<p class="syntax"><section begin="syntax" /> %LSTR = $Web_Output_Content( type ) | <p class="syntax"><section begin="syntax" /> %LSTR = $Web_Output_Content( type ) | ||
<section end="syntax" /></p> | <section end="syntax" /></p> | ||
===Syntax terms=== | |||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>type</th> | <tr><th>type</th> | ||
Line 26: | Line 26: | ||
</table> | </table> | ||
==Usage notes== | |||
$Web_Output_Content can be used to examine data in the ''[[Janus Web Server]]'' output stream that results from Print or Html/Text statements when web capture is on ($Web_On), or to examine data that results from $WEB_PROC_SEND. | $Web_Output_Content can be used to examine data in the ''[[Janus Web Server]]'' output stream that results from Print or Html/Text statements when web capture is on ($Web_On), or to examine data that results from $WEB_PROC_SEND. | ||
Line 42: | Line 43: | ||
Having the output content as a single longstring might be inconvenient for many applications, especially if the data is line-oriented. It is the application's responsibility to parse this longstring using either longstring parsing functions (see the ''Sirius Functions Reference Manual'') or Stringlist parsing methods (see the ''Janus SOAP Reference Manual'' -- the Stringlist class ParseLines method is likely to be particularly helpful). | Having the output content as a single longstring might be inconvenient for many applications, especially if the data is line-oriented. It is the application's responsibility to parse this longstring using either longstring parsing functions (see the ''Sirius Functions Reference Manual'') or Stringlist parsing methods (see the ''Janus SOAP Reference Manual'' -- the Stringlist class ParseLines method is likely to be particularly helpful). | ||
==See also== | |||
See also | |||
<ul> | <ul> | ||
<li>[[$Web_Output_Type]] | <li>[[$Web_Output_Type]] |
Revision as of 19:41, 6 June 2012
<section begin="desc" />Retrieve current output stream<section end="desc" />
$Web_Output_Content retrieves the current contents of the Janus Web Server output stream as a longstring.
$Web_Output_Content takes a single optional argument and returns a longstring.
Syntax
<section begin="syntax" /> %LSTR = $Web_Output_Content( type ) <section end="syntax" />
Syntax terms
type | A case-independent string set to one of the following:
type is an optional argument, and it defaults to Binary. |
---|
Usage notes
$Web_Output_Content can be used to examine data in the Janus Web Server output stream that results from Print or Html/Text statements when web capture is on ($Web_On), or to examine data that results from $WEB_PROC_SEND.
$Web_Output_Content cannot examine output data in these cases:
- After a $Web_Done
- After a $WEB_PROC_SEND without the MORE parameter
- After a $Web_Flush
Text data is typically translated from EBCDIC to ASCII when sent to the Janus Web Server output stream. When the Text option is used with $WEB_OUTPUT_CONTENT, the data is translated back. If the EBCDIC-to-ASCII and ASCII-to-EBCDIC translate tables are not completely symmetrical, it is possible that the results of $Web_Output_Content will not be exactly what was sent.
A particular translation problem is the pair of square bracket characters ([ ]), which has three different EBCDIC representations but only one ASCII representation. If the preferred EBCDIC square bracket values at a site are not the ones to which the default ASCII-to-EBCDIC translate table translates, the translate tables can be modified. For more information about this, see the "Translate Tables" chapter in the Janus TCP/IP Base Reference Manual.
ASCII carriage returns (X'0D'), linefeeds (X'0A'), or both are added to the output stream for each text data output line (according to the CR, LF, or CRLF setting of JANUS DEFINE, JANUS WEB ON, or $Web_ProcSend). These characters get translated back to EBCDIC carriage returns (X'0D') and linefeeds (X'25') by $Web_Output_Content.
Having the output content as a single longstring might be inconvenient for many applications, especially if the data is line-oriented. It is the application's responsibility to parse this longstring using either longstring parsing functions (see the Sirius Functions Reference Manual) or Stringlist parsing methods (see the Janus SOAP Reference Manual -- the Stringlist class ParseLines method is likely to be particularly helpful).