What Are the Building Blocks of a WebFOCUS Maintain Project?
After you open the Maintain Development Environment
and create a project, you must add components to your project. You
can add any file you want to your project, although when you deploy
your project to create an application, these files should make sense
in the context of where you are deploying them. For example, WebFOCUS Maintain
can deploy to MVS machines, but deploying a graphic file there may
not work well.
When you first create a project, WebFOCUS Maintain creates four
folders that represent some common components that you may want
to place in your project:
-
HTML Forms. Files
with the extensions .htm and .html.
-
Maintain Files. Maintain
procedures and forms. You create them using the Maintain Development
Environment. For more information on procedures, see Developing Procedures.
-
Master Files. Files
that describe the data on which WebFOCUS Maintain operates and have
the extensions .mas and .acx. For more information, see Incorporating Data Sources Into Your Project.
-
Procedures. New
FOCUS procedures you create using WebFOCUS Developer Studio. For
more information, see Using WebFOCUS Procedures in Your Application.
You can add components to a project either by creating new ones
or by copying existing ones.
xCreating New Project Files
You can use WebFOCUS Maintain to create new project files for
the following items:
- Maintain procedure
- (Web)FOCUS
procedure
- Master File
- VBScript
- JavaScript®
- HTML document
- Text
x
Procedure: How to Create a Project Component
To create
a project component:
-
Do one
of the following:
- Right-click
either the project or one of its folders in the Explorer, click New in
the pop-up menu, and then click Project file.
or
- In the File
menu, click New, then click Project
file.
-
In the
Create new project file dialog box, select the type for the new component,
as shown in the following image.
-
Choose
a location for the component. Your options include any of the directories
in the project path. For more information on paths, see How to Change the Project Path.
-
Type
a name for the component. This name must conform to Windows naming
standards. WebFOCUS Maintain appends the appropriate extension to
the file name.
-
If you
are creating a Maintain procedure, you can select the Import
module check box to indicate that the procedure will
be an import module. An import module is a procedure that contains
functions that are called by other Maintain procedures only, but
does not run on its own. This means that there will be no Top function.
For more information on import modules, see Developing Procedures.
-
Click OK.
xAdding Existing Files to Your Project
In addition to creating new files, you can also add
existing files to your project. This option allows you to reuse
existing files without having to recreate them.
x
Procedure: How to Add an Existing File to Your Project
To add
an existing file to your project:
-
Ensure
that WebFOCUS can see the type of file you want to add to the project.
If the file is an HTML File (.htm or .html), a Maintain procedure
(.mtn or .for), a Master file (.mas or .acx), or a FOCUS procedure
(.fex), you do not need to do anything here. If you are adding another
type of file, see How to View New File Types in the Explorer.
-
Ensure
the file you want to add is in the project path. Do one of the following:
- Open the Properties
dialog box for the project, click the Directories tab,
and add the directory where the file is located.
or
- Using Windows
Explorer, move the file to one of the directories that are in the project
path.
-
Turn
on Display all files in the project paths:
- Click the Display
all files in the project paths button .
or
- In the View
menu, turn on Show All Files.
-
Right-click
the file in the Explorer and click Add to Project in
the pop-up menu.
x
Procedure: How to Add an Existing File From Another WebFOCUS Server to Your Project
If
the file you want to add to your project is not on your machine,
but located on another WebFOCUS Server, you can still add it to
your project.
-
In the
Explorer window, expand Remote Application Servers.
-
Expand
the WebFOCUS Server where the file you want to add to your project
is located.
-
When
you find the file, drag it into your project folder.
xWhat Other Types of Files Can Go Into a WebFOCUS Maintain Project?
There are many other kinds of files that you might want
to include in your WebFOCUS Maintain project.
For example, you can include graphics, ActiveX controls, and
any of the following types of external procedures:
- 3GL programs
(COBOL, C, C++).
- CICS transactions.
- IMS/TM transactions.
- RDBMS stored
procedures (from Oracle® or Sybase®, for example).
Being able to include all of these kinds of procedures into your
project can preserve your investments in these pieces of software.
- To execute
an external procedure with static parameters from a Maintain procedure,
you use the EXEC command to call a WebFOCUS procedure that will
execute the external procedure. For more information, see Executing Other Procedures,
and Using WebFOCUS Procedures in Your Application.
- You can also
execute external procedures from a script function using the IWCLink function.
This enables you to pass dynamic parameters to the external procedure.
For more information, see the Using Functions manual.
xDefining the Flow of a Project
A project must contain one or more procedures. One of
these procedures is your starting procedure, which is executed first
when you execute the project. The other procedures are executed
only if they are called explicitly using the CALL syntax.
A procedure consists of functions (defined by the CASE and ENDCASE
keywords). One of the functions in your procedure is called Top,
and is executed when the procedure is executed. As with procedures,
the other functions are executed only if they are called explicitly
using the PERFORM syntax.
To display an initial form somewhere in the Top Case of the starting
procedure, you must insert the command that displays this form (or
Top Case should call another function or procedure that executes
this command). The command you use to display a form is Winform
Show form.
Before setting up a project, it is recommended that you read Designing Applications for Scalability and Performance.