How to:

When you develop your project, you divide it into a few logical components that accomplish specific tasks, such as placing a new order or checking the status of an existing order. These logical components are called procedures. Procedures are the main building blocks of your project.

For information on how to create a procedure, see How to Create a Project Component. For information on how to add an existing procedure to your project, see How to Add an Existing File to Your Project.

Procedures can operate on data sources. If a procedure accesses a data source, either to extract data or to write data, you must specify which data sources the procedure accesses. For more information, see Specifying Data Sources for Your Procedure.

A procedure can consist of any combination of the following:

Procedures can also call other procedures as a part of their execution, and can pass data back and forth using input and output parameters. For more information, see Executing Other Procedures.

A special kind of procedure is called an import module. An import module is a non-executable procedure that contains Maintain language code. You do not execute an import module as part of your project. Instead, you use it as a library of functions or classes.

Top of page

Procedure: How to Designate the Starting Procedure

One of your procedures is designated as the starting procedure. When you execute the project, WebFOCUS Maintain executes the starting procedure first.

  1. Open the Properties dialog box for the project.
  2. In the Starting Object list box, select the procedure you wish to use as your starting procedure.
  3. Click OK.

Top of page

Procedure: How to Edit the Source Code of a Procedure

WebFOCUS Maintain generates Maintain language code for all procedure components. You can edit this code directly in the Procedure Editor.

  1. Right-click the procedure.
  2. In the shortcut menu, click Edit source or Open.
  3. All procedures begin with the keyword MAINTAIN and end with the keyword END. Make your desired changes to the code between these two keywords.

    For more information, see Command Reference in the Maintain Language Reference manual.

  4. Close the Procedure Editor.

Note: If WebFOCUS Maintain determines that there is a syntax error in your procedure, the words Syntax Error appear next to the procedure name in the Project Explorer, an error message appears in the Output window, and the offending line is marked with an exclamation mark in the Procedure Editor. You are unable to edit forms or perform drag-and-drop functions in that procedure until you fix the syntax error. You can open the procedure at the syntax error by double-clicking on the syntax in the Output window.

Top of page

Procedure: How to Use the Language Wizard

WebFOCUS Maintain provides a Language Wizard to help you construct Maintain language source code.

  1. Place the cursor where you want your source code to go.
  2. Right-click at the insertion point and choose Language Wizard from the shortcut menu. The first screen of the Language Wizard opens.
  3. Select the type of code you wish to create and follow the online instructions.

The Language Wizard can generate Maintain commands to perform the following tasks:

Top of page

Procedure: How to Access Help for Any Maintain Language Keyword
  1. Select the keyword.
  2. Press the F1 key.

Top of page

Procedure: How to View the Description of a Procedure Component

When you create a function, variable, class, or data source stack using the Function Editor, Variable Editor, Class Editor, or Stack Editor, the Description tab enables you to enter a description for that component. To view this description:

  1. Select the function, variable, class, or data source stack.
  2. Press F4.


    Right-click the function, variable, class, or data source stack, and in the shortcut menu, click Show description.

Top of page

Procedure: How to View Your Procedure Components in Folders

By default, your functions, variables, stacks, and classes appear directly under your procedure in the Project Explorer, while your forms appear in a Forms folder under the procedure.

If you wish, you can display the functions, variables, data source stacks, and classes in their own folders under the procedure:

  1. In the Tools menu, click Environment options.
  2. Click the Project Explorer tab.
  3. Select the procedure components that you want to display in folders.
  4. Click OK.