Subroutine Name | Executable Example | Viewable Example |
---|---|---|
W3INIT |
E3END |
E3END |
Each Program needs to initialize and end the web interface by special
programs. The initialisation is done by W3INIT
. The PDA
W3PARM
must be passed to initialize passed parameters for further
use. W3END
ends the document and prepares the return to the
HTTPserver. The PDA W3PARM
defined at the initial program has to
be passed to W3END
. If W3*
calls are performed after
W3END
, the written output will not be transferred to the HTTP
server.
With SYSWEB3, W3PARM
has been changed to provide an
improved interface to the HTTP server. The new interface is capable of
transferring binary or alpha data, using other mime-types such as
'application/x-www-form-urlencoded' for incoming data and allows the usage of
HTTP PUT requests.
For compatibility reasons, the new features HTTP PUT and other
mime-types for data input can only be used, if W3INIT
is called
with an additional parameter:
2nd Parameter := TRUE - activates other mime-types then
'application/x-www-form-urlencoded' for incoming data
3rd Parameter := TRUE - activates HTTP PUT requests.
New optional parameters added.
W3INIT
##RPC /* i /m : Parameter of Subprogram TRUE /* io/ : TRUE to activate mime-types TRUE /* io/ : TRUE to activate HTTP PUT
W3END
##RPC /* o/m : Parameter of Subprogram
W3PARM
1 ##RPC /* use only with SYSWEB3 2 LOG-TIME (A30) /* i /m : Timestamp 2 VERSION (A) DYNAMIC /* i /m : Interface version 2 HTTP_HEADER (A) DYNAMIC /* io/m : HTTP header 2 C_HTTP_HEADER (I4) /* io/m : Bytes sent 2 HTTP_BODY (A) DYNAMIC /* io/m : HTTP body alphanumeric 2 HTTP_BINARY (B) DYNAMIC /* io/m : HTTP body binary 2 C_HTTP_DATA (I4) /* io/m : Bytes sent 2 MIME-TYPE (A) DYNAMIC /* io/m : Mime-type sent 2 ERROR-NR (I4) /* io/m : Generation result
PERFORM W3INIT ##RPC PERFORM W3INIT ##RPC TRUE /* activate mime-types ne 'application/x-www-form-urlencoded' PERFORM W3INIT ##RPC TRUE TRUE /* activate mime-types and HTTP PUT PERFORM W3END ##RPC