Top
PowerCOBOL V11.0 User's Guide
FUJITSU Software

9.5 PowerCOBOL Overall Application Architecture

Understanding the overall architecture of a PowerCOBOL application is the key to developing consistent and efficient applications. In this section you will learn not only about application architecture, but also how to access files and data items across multiple forms and programs.

PowerCOBOL makes extensive use of newer enhancements to the COBOL language in order to effectively design the application architecture.

For many years, a major complaint about COBOL versus newer programming languages was that COBOL is too static.

Some other programming languages support the creation of functions that have their own local data items. In a traditional COBOL program, all data items must be predefined in the WORKING-STORAGE or LINKAGE Sections.

This means that these data items are accessible from any portion of the COBOL program.

Local data is the concept of having a function (for example, a sub-routine) that has its own data items, which are not made available to the rest of the application. Only the function is aware of its data and thus only the function may change its data.

This is one of the basic building blocks of object-oriented programming. It allows developers to break up complex applications into smaller, more easily managed functions that in turn encapsulate their data and methods.

The ANSI 85 specification thus includes support for embedded programs. This allows COBOL programmers to create independent COBOL programs (complete with a unique Program-ID) and to embed these independent programs right into an existing COBOL program. They may then be called like normal external COBOL programs.

Because these programs are embedded into the main application, they are much more efficient to communicate with at run-time. Additionally, they may encapsulate their own data and sub- functions (methods) within an application.

NetCOBOL fully supports embedded programs. PowerCOBOL takes advantage of this by creating embedded programs for each event procedure and/or form procedure created by a developer.

The most recent enhancement to the COBOL language is object- oriented extensions.

PowerCOBOL can create ActiveX controls (created as .DLL files) and register them with the Windows operating system.

The following figure shows the overall architecture of a PowerCOBOL application.

Figure 9.5 The overall architecture of a PowerCOBOL application

In reviewing Figure 9.5 above, the following facts should be considered: