Getting Started


Chapter 10. Defining a program

After you have created a new container for your parts and set your preferences, you can begin developing a program. This tutorial takes you through a top-down approach to developing a small sample program.

The sample program you develop in this tutorial lists customers from a table that is shipped with VisualAge Generator. With your sample program, users can perform the following tasks:

The relational table shipped with VisualAge Generator contains the SQL column information shown in Figure 43.

Figure 43. Record Editor

Figure edtrrecd not displayed.

The columns of the table can be displayed using arrays in a single map. The map can also contain the starting staff identifier number, the current date, a message line, and a line of prompts for the function keys that are available.

As you develop, you can look at a diagram of your program using the Program Editor shown in Figure 44.

Figure 44. Program Diagram

Program Diagram

VisualAge Generator shows the elements of the program symbolically. The program diagram is divided into two parts: Specifications and Structure Diagram. The program diagram shows the logical hierarchy of the components of a program. The following icons represent elements used in this tutorial:

Figure iconproc not displayed.
A function--For functions, the connecting lines from the function symbol show the functions that are logically beneath the function.

I/O options and I/O object names appear to the right of the function symbol. Record or map symbols displayed immediately under functions, in the expanded view, are I/O objects.

Record
A record

A map
A map

You can expand or collapse sections of the program diagram to control what levels of the hierarchy you see in the Program Editor. You can click on the following symbols to expand or collapse a section:

Figure dashbox not displayed.
Indicates that the section is expanded. Click on this symbol to collapse the section next to it.

Figure plusbox not displayed.
Indicates that the section is collapsed. Click on this symbol to expand the section next to it.

Parts in the program diagram that do not show one of these symbols have no child symbols and cannot be expanded.

A Figure questbox not displayed. next to a symbol indicates that the part has not yet been defined.

In this tutorial, you are developing from the top down, starting with the program, then defining the functions, and then the I/O objects. As you define the program, you will perform an intermediate test to ensure that the program is defined correctly.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]