Fujitsu PowerCOBOL
The following sequence of screen captures lets you see the features of Fujitsu PowerCOBOL at work.
Project Tree-view
Form Editor
Adding ActiveX Controls
Selecting Events
Coding Events
Referencing Methods
Referencing Properties
Debugging Applications (1)
Debugging Applications (2)
Points to watch for in the Fujitsu PowerCOBOL walk-through include:
- High-level view of projects in the project tree-view
- Drag and drop form design
- Easy ActiveX control inclusion
- Guided coding of events, references and methods
- Automated generation of source code
- Automated build process
- Debugging with control and visibility
Project Tree-view
At the center of PowerCOBOL is the project tree-view which uses icons that match the icons used in the form design. It lets you:
- See all the constituent parts of a PowerCOBOL project.
- See how these parts are combined to make up forms and modules.
- Use property list on right hand side for an overview of property values.
- Edit property values using the property list.
- Use pop-up menus to start relevant functions.

Form Editor
The Form Editor provides:
- Drag and drop design using the Tool Box (shown on left-hand side).
- An optional alignment grid (made visible in the screen capture below - see the dots).
- Access to all the form properties and supporting code (see later screen captures).
- A preview function to quickly check your design's run-time behavior.

Adding ActiveX Controls
Add any registered ActiveX control by displaying the Custom Controls dialog and checking its box.
For example, the Microsoft Access Calendar Control is selected below.
Check the Form Editor screen capture below to see that the calendar icon (
) is added at the bottom of the item box.

Selecting Events
In the Form Editor you find and access the events for each control by using pop-up menus.

In this example the form (the whole window) is the selected control. The right mouse button has been clicked to bring up the larger pop-up menu and "Edit Event Procedures" clicked to display the smaller menu that lists the events that apply to the form. Note:
- You immediately know the list of events that apply to the form.
- Events have meaningful names.
- An asterisk by an event indicates code has been written for that event.
- No asterisk indicates there is no code for that event (so no special actions will be taken).
- Clicking on an event in the pop-up opens the code window for that event. (See Coding Events below)
- For a form, you can create global code (such as data definitions) and common sub-routines by accessing COBOL sections within the ENVIRONMENT, DATA, and PROCEDURE DIVISIONS.
Coding Events
When you select an event, PowerCOBOL displays the code for that event. A program, referred to as a "scriptlet" in PowerCOBOL, handles each event. The example below shows code that is invoked when the form is closed.
- Scriptlets can be a few lines or many lines.
- You enter the COBOL code using normal editing functions.
- See Referencing Methods and Referencing Properties for labor and error-saving code generation functions.
- You can declare local data or you can use global data.
- Code is colored to aid readability.

Referencing Methods
When editing code you can check on available methods and generate the invoking code by using pop-up menus.

In the above example the programmer has entered, or pasted, the name of a control - in this case the CmMCI1 MCI control. The name has been selected and the right mouse button clicked to bring up the left-hand pop-up menu. Selecting "Insert Method" displayed the right-hand menu containing all the methods that apply to the selected control.
Note: You immediately know what methods are available:
- Methods have meaningful names.
- Selecting the method from the pop-up menu prompts PowerCOBOL to generate the appropriate code to invoke the method: the text 'CmMCI1' in the program is replaced with 'INVOKE CmMCI1 "SetMCICommand" USING Command RETURNING ReturnValue'.
Referencing Properties
When editing code you can also check on available properties and generate code to reference properties using pop-up menus.

In this example the programmer has selected the text "CmMCI1" and right-clicked to bring up the pop-up menu. This time the Insert Property sub-menu has been selected to display a list of all the properties of the CmMCI1 MCI control. Note:
- You immediately know what properties apply to the selected control.
- Properties have meaningful names.
- Selecting the property from the pop-up menu prompts PowerCOBOL to generate the appropriate code to reference the property.
Building Applications
PowerCOBOL creates executables for you using the Build function.
- The Build window shows the progress and results of the latest build.
- The Build window provides functions for checking errors, and building all or part of the project.

Debugging Applications (1)
PowerCOBOL's Debug window displays project and debug information in four panes.
- The top pane contains the project tree-view.
- The left middle pane indicates the active programs and the current program.
- The right middle pane contains the list and values of data items being monitored.
- The bottom pane communicates major execution actions and displays error messages.

Debugging Applications (2)
The PowerCOBOL Debugger lets you:
- See the overall structure and execute line by line - at the same time.
- View the executing form while watching the code.
- Watch and change data item values.
- Set breakpoints.


