Executing Maintain Procedures From Outside the Maintain Development Environment

In this section:

How to:

You can execute a WebFOCUS Maintain procedure from any of the following:

If you are using the Shared Application Server, see Developing an Application for a Shared Application Server for information on executing a WebFOCUS Maintain application.


Top of page

x
Syntax: How to Execute a WebFOCUS Maintain Procedure

To execute a WebFOCUS Maintain procedure that has not been compiled (with either a .mnt or .fex extension or MAINTAIN or FOCEXEC file type or ddname), use the following syntax

MNTCON EX [appname/]procname [-v  "parm1" ,  ... "parmn"] 

To execute a WebFOCUS Maintain procedure that has been compiled (with either a .fcm extension or FOCCOMP file type or ddname), use the following syntax

MNTCON RUN [appname/]procname [-v  "parm1" ,  ... "parmn"] 

where:

appname

(optional) Is the directory name on the WebFOCUS Server where the Maintain procedure is located.

procname

Is the name of a Maintain procedure.

-v

(optional) is the flag that indicates parameters will be passed to the Maintain procedure.

parm1 ... parmn

Can be either positional parameters or parm="value" keyword parameters. Parameter types can be mixed within the same MNTCON EX or MNTCON RUN command line. The maximum number of parameters you can pass is 128; you should separate all parameters using commas. You should enclose values containing spaces or commas in single or double quotes. Use with Sys_mgr functions (Sys_Mgr.Get_NameParm, Sys.Mgr.Get_InputParams_Count and Sys_Mgr.Get_PositionParm) to retrieve the values. For more information, see MNTCON EX, MNTCON RUN, and SYS_MGR in the Command Reference in the Maintain Language Reference manual.

You can use the Developer Studio HTML Layout Tool to easily create your own launch form for your WebFOCUS Maintain applications, by selecting the desired .mnt or .fcm file from the list of external procedures in the 'Create a Hyperlink' dialog. For more information, see the Creating Reporting Applications with Developer Studio manual.



Example: Invoking an Uncompiled Maintain Procedure
MNTCON EX MYAPP 


Example: Passing Parameters to a Compiled Maintain Procedure
MNTCON RUN start1 –v NASA, '24 Houston Center', ADDR='Cape Canaveral',
COUNTRY=USA

For more information on the WebFOCUS Developer Studio Command Console, see the Creating Reporting Applications with Developer Studio manual.


Top of page

x
Using the Developer Launch Console

The Developer Launch Console enables you to view and execute WebFOCUS applications and procedures.

To use this tool, start your WebFOCUS Server and point your browser at http://localhost:8080/ibi_html/applaunch.html.

WebFOCUS server image example

After signing on to the WebFOCUS Server, you will see in the left pane the list of WebFOCUS Servers available to you (in this case, localhost is the only server available to us).

WebFOCUS diagram tree

If you expand WebFOCUS or WebFOCUS DATA SERVER under any WebFOCUS Server, you will see a list of the applications on that WebFOCUS Server. The WebFOCUS folders contain the HTML forms for each application; the WebFOCUS DATA SERVER folders contain the WebFOCUS and Maintain procedures.

WebFOCUS diagram tree

If you expand any application, you will see the WebFOCUS and Maintain procedures or HTML forms in that application.

WebFOCUS diagram tree

To run a procedure or HTML form, click it. The results will appear in the pane on the right.


Top of page

x
Using the WFMSTART.HTML Launch Page

The WFMSTART.HTML launch page, found in the /approot/ibisamp directory, can launch any WebFOCUS Maintain application.

You can also use this launch page as a basis for creating your own launch page.

The launch page also includes an entry field for a Google API License. You can embed Google Maps into your Maintain applications using the Google Maps JavaScript API. To do this you need to first get an API key. You can refer to the WebFOCUS Developing Reporting Applications with Graphical Tools manual for more information on generating a Google Maps API license key. By entering the license key in the sample WFMSTART.HTML launch page, you can pass the API key to your Maintain application allowing you to incorporate Google Maps onto your forms. You can use an HTML Object to display the map, and JavaScript commands to manipulate it. Please see the documentation found at the Google Maps API site for more information on attaining the key and manipulating the object.


WebFOCUS