Note: Usage options

A WEBROUTINE is an entry point into a WAM. A WAM may contain one or more WEBROUTINEs. The WEBROUTINE names have to be unique within a WAM only. It is possible to have more than one WAM with a WEBROUTINE with the same name.

You can add a new WEBROUTINE anywhere inside BEGIN_COM block in your WAM component by using a WEBROUTINE keyword.

The WEBROUTINE command is followed by a one or more WEB_MAP commands - each WEB_MAP command identifying fields or a lists that are to be mapped as input or output of the Webroutine. Collectively, the WEB_MAP commands define all the inputs and outputs of a Webroutine. All fields and lists defined FOR(*INPUT) can be sent to the called WEBROUTINE and they will be mapped into those fields and lists. Any fields or lists defined FOR(*OUTPUT) are outgoing from the WEBROUTINE and can be visualized on the output page. In addition field and list mapping can be bidirectional in which case FOR(*BOTH) specification should be used.

A WEBROUTINE is invoked via a URL request and is uniquely identified by the key of Web Application Module (up to 10 characters) and WEBROUTINE name (up to 20 characters).

Each WEBROUTINE generates separate XML and XSL data. The XML data contains all the fields and lists nominated by the WEB_MAP FOR(*OUTPUT) or FOR(*BOTH) commands.

Also See

7.130.1 WEBROUTINE Parameters

7.130.2 WEBROUTINE Examples




    WEBROUTINE ----NAME -------Name of WebRoutine ---------------->    






               >-- DESC ------- Description of routine ----------->     


               >-- RESPONSE ----*DEFAULT ------------------------->     



                                Response Variable (LOB)


               >-- OPTIONS -----*METADATA ------------------------>     


               >-- ONENTRY -----*SESSIONSTATUS_OF_WAM------------->     




               >-- HELP --------Help Text ------------------------>     


               >-- ServiceName- Name of Service ---------------------|