PreviousUsing the Screenset Data AccessNext

Chapter 8: Windows GUI Application Wizard

The previous chapters have given you an introduction to the basic elements of Dialog System. This chapter describes how the new Windows GUI Application Wizard provides you with:

As well as creating a new screenset, the Wizard process automatically generates associated COBOL programs configured to the functionality you have requested. Both the screenset and associated COBOL programs are automatically added to your project if required.

Note: The programs and files that are output as a result of using the Windows GUI Application Wizard are meant as a starting point for developing your own applications. They are not intended to be universally applicable to all situations, but are provided so that you can learn to use the basics. You can then adapt the code provided to suit your own needs.

The chapter Creating a Windows GUI Application in the Getting Started on-line book is a tutorial which includes practical details on how to use this wizard.

8.1 Starting the Wizard

There are three ways of starting the Windows GUI Application Wizard:

Note: If you open the Wizard from the IDE, and you do not have a project open, the Wizard creates a new project. You need to supply the project's name and location.

8.2 Using the Wizard

This section gives you a brief description of the features in each step of the Wizard.

8.2.1 Step 1: Screenset Name

The Wizard offers you a name and location for your new screenset. You can change either or both of these.

8.2.2 Step 2: Interface Type

Here you select whether your new screenset is to have a Multiple Document Interface (MDI) or a Single Document Interface (SDI). If you require an MDI application, you specify how many MDI children the interface is to have. If it is an SDI, you specify how many primary windows are required.

8.2.3 Step 3: Class Library Features

You can select features for your new screenset such as a Status Bar and a Main window toolbar. For all of the features requested, appropriate Data Block, Dialog and controlling programs can be generated. This step in the Wizard is shown in Figure  8-1.

Step 3
Figure 8-1: Class Library Features

Selecting Use OpenESQL Data Access enables you to access any installed ODBC datasource and to set up queries as described in the next step. If you leave this option unchecked, you skip the next step and go directly to Step 5.

When you select Use OpenESQL Data Access, a status bar is automatically selected for your screenset.

8.2.4 Step 4: Defining a Query

If you have not selected Use OpenESQL Data Access in Step 3, you skip this step and go directly to Step 5.

Note: If you did not install the ODBC Drivers at installation time, you need to do so before you can use this part of the Wizard.

In this step you can:

Note: You must select at least one primary key. If you do not select a primary key, one is automatically selected for you.

The screen for this step in the Wizard is shown in Figure  8-2.

Step 4
Figure 8-2: Defining a Query

This screen is used to build and test queries for use in your generated application. You can activate it independently from the View OpenESQL Assistant menu in the IDE.

For further details about database access and how to use SQL, see the chapter OpenESQL in the Database Access on-line book.

8.2.5 Step 5: Extensions

In this step you set up parameter blocks in your Data Block to enable the use of any of the Dialog System extensions that you may need for your screenset. Each extension has different requirements.

8.2.6 Step 6: Dialog System Run-time Configuration Options

Selecting any of these options causes the relevant dialog code to be inserted into your generated screenset.

Click Help for full details on each option.

8.2.7 Step 7: Generate COBOL Programs

If you select Generate skeleton COBOL program, Dialog System will generate a skeleton COBOL program, which starts the application with a call to dsgrun. A default name is provided but you can enter a name and location for this program.

The screen for this step in the Wizard is shown in Figure  8-3.

Step 7
Figure 8-3: Generating Programs

You will see an entry for Name of generated Data Access program only if you selected Use OpenESQL Data Access in Step 4.

8.2.8 Step 8: Validation of Selected Options

In this step you validate the options that you have selected in the previous steps. You can return to earlier steps to amend any selections. After accepting your selections, the project, screenset and programs are created.

8.3 Output from the Wizard

The following files are output from the Windows GUI Application Wizard, with the data access options selected:

8.4 Running the Application

To use the output from the Windows GUI Application Wizard to view, query or change the database details:

  1. Rebuild the project by selecting Rebuild All on the IDE Project menu.

  2. Run the application using the IDE by clicking Run on the toolbar or selecting Run on the Animate menu.

8.5 Further Information

Now that you have generated a data access application, you can manipulate the data. See the following chapter, Data Access for details.

Copyright © 1998 Micro Focus Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.
PreviousUsing the Screenset Data AccessNext