In this section:

How to:


You use the MNTCON EX command to run an uncompiled Maintain procedure.

This command is outside the Maintain language, but is described here in Command Reference for your convenience.

Top of page

Syntax: How to Use the MNTCON EX Command

To run an uncompiled WebFOCUS Maintain procedure (with either a .mnt or .fex extension, or a MAINTAIN or FOCEXEC file type or ddname), use the following syntax

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



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


Is the name of a Maintain procedure. First, the MNTCON EX command looks for a Maintain procedure with a .mnt extension or a MAINTAIN file type or ddname. If it does not find one, it looks for a Maintain procedure with a .fex extension or a FOCEXEC file type or ddname.


Is the flag that indicates parameters will be passed to the Maintain procedure. This is optional.

parm1 ... parmn

Can be either positional parameters or parm="value" keyword parameters. Parameter types can be mixed within the same MNTCON EX command line. The maximum number of parameters you can pass is 128. You should separate all parameters using commas. You should use single or double quotes to enclose values containing spaces or commas. Use with Sys_mgr functions (Sys_Mgr.Get_NameParm, Sys.Mgr.Get_InputParams_Count and Sys_Mgr.Get_PositionParm) to retrieve the values. If any of these functions are unsuccessful, FOCERROR is set to -1.

For more information, see the Developing WebFOCUS Maintain Applications manual, and SYS_MGR.

Top of page

Reference: Commands Related to MNTCON EX

Top of page

Invoking Maintain Procedures: Passing Parameters

How to:

You can issue MNTCON EX or MNTCON RUN with the flag –v to pass input parameters from the command line when invoking Maintain applications, in a manner similar to passing parameters to WebFOCUS FOCEXECs. This method bypasses the requirement of importing the webbase2 file and coding web client variable retrieval. You can use this syntax in a FOCEXEC (.fex) or from within a backend server edastart –t session.

Positional and key-matching parameters are supported, and you can use both together in the same Maintain EX or RUN command. Parameters are defined as A0. The maximum number of parameters you can pass is 128. You may include Dialog Manager commands in a FOCEXEC when invoking MNTCON EX or RUN with the –v option.

Syntax: How to Use the MNTCON EX Command to Pass Parameters
MNTCON [EX|RUN] procname –v  "parm1value" ... "parmnvalue"


parm1value ... parmnvalue

Can be either positional parameter values in single quotes or double quotes, or a parm="value" key-matching parameter. You can mix positional and key-matching parameters.

The target Maintain procedure uses Maintain SYS_MGR function subcommands to retrieve the values.


If any of these SYS_MGR functions is not successful, FOCERROR is set to -1.

For more information on SYS_MGR functions, see SYS_MGR.

Example: Passing and Retrieving Parameters
MNTCON EX START1 –v abc, '24 Houston Center' , ADDR='Cape Canaveral", 

Target Maintain procedure START1 could include:


to get the first positional parameter. Here it returns value abc for Parm1.


to return the total number of positional parameters. Here it returns 2 for Posvar.


to return value for key-matching parameter ADDR. Here it returns Cape Canaveral for Address.

Note: Sys_mgr.get_nameParm is case-sensitive. Use the same case for the parameter when retrieving the value as you use when passing it.

For more information on SYS_MGR functions, see SYS_MGR.