How to:


You use the MNTCON RUN command to run a Maintain procedure that has been compiled.

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

Top of page

Syntax: How to Use the MNTCON RUN Command

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

MNTCON RUN [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.


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 RUN 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 RUN

For information on passing parameters with MNTCON RUN, see Invoking Maintain Procedures: Passing Parameters.

Top of page

Syntax: How to Use the MNTCON RUN 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 RUN START1 –v NASA, '24 Houston Center', ADDR='Cape Canaveral', 

Maintain procedure START1 could include:


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


Here FOCERROR is set to -1, as there were only two positional parameters passed.


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.