GUI ScreenIO for Windows

 ScreenIO.com


Using the Program Generator

The GUI ScreenIO program generator will create program shells for all of the panels which are open in the panel editor at the time it is invoked.  You may open up to 50 panels at the same time.

The code generated by the STANDARD template conforms to the coding style that we recommend.  You'll find the generated program is very straightforward, appropriately commented, and easy to understand. 

This is a very painless way to get started with GUI ScreenIO.

STANDARD template

The STANDARD template that we provide is named STANDARD.GTM.  It is designed to produce complete main programs and subroutines that will compile and run successfully without modification (although you'll need to add your application logic to make it actually DO anything). 

A MAIN panel is required in order to create a complete main program that will compile and run.  The STANDARD template does this by hard-coding this statement in the WORKING-STORAGE section:

COPY "C:\Program Files\GUI ScreenIO\Templates\TESTMAIN.COB".

This means that the STANDARD template uses the default MAIN panel TESTMAIN.COB that is installed in the standard template directory. 

You may modify this COPY statement to include your own MAIN panel if you wish; just edit the template and change this statement.

Custom templates

You may also create your own custom templates to suit your own standards or coding style. 

The easiest way to do this is to make a copy of the standard template (using a different name) and then modify it as you wish.  Your new template will be available the next time you generate a program.

Program generator options

Select Tools/Program Generator from the main menu. 

Item Significance
Type of program:

One Main for EACH panel

Creates one COBOL main program for each panel that is open in the editor. 

Recommended for testing individual panels, or for single-panel applications. 

See text below regarding the default Main panel in the STANDARD template.

Type of program:

One Subroutine for EACH panel

Creates one COBOL subroutine for each panel that is open in the editor.

Recommended programming style because programs are relatively small and are therefore easy to write and debug.  They are also easy to reuse because it's easy to CALL them from wherever you need them in your application.

Type of program:

One Monolithic program containing ALL panels

Creates a single COBOL main program containing all of the panels that are open in the editor. 

See text below regarding the default Main panel in the STANDARD template.

Type of program:

One Subroutine containing ALL panels

Creates a single COBOL subroutine containing all of the panels that are open in the editor.
Type of program:

One COBOL SECTION containing ALL panels

Creates a COBOL SECTION containing all of the panels that are open in the editor.
Type of program:

One COBOL SECTION for EACH panel

Creates a COBOL SECTION for each panel that is open in the editor.
Output file specifications:

Template to use

Specifies which template to use for creating the programs.  See below for more details.
Output file specifications:

Edit selected template...

Opens the selected template with Notepad so that you can examine or modify it. 
Output file specifications:

Prefix of output filename

The first 0-5 characters of the generated program name(s).  The program generator appends a three digit number to this when it creates the programs.

For example, if you specify the prefix is ABC, the first program will be ABC001.COB, the second ABC002.COB, and so on.  If a program already exists with the generated name, the number will be incremented. 

The program generator will NOT overwrite existing files.

Output file specifications:

File extension

The file extension; the defaults are COB, CBL, CPY, and INC.  You may type a different extension if you wish.
Output file specifications:

COBOL format 1-80

Produces a standard COBOL format, with columns 1-6 present and column 7 used for a comment indicator.
Output file specifications:

COBOL format 1-74

Produces a COBOL format where everything is shifted LEFT by 6 characters; e.g., the comment indicator is in column 1.
Output file specifications:

Place programs in this directory

The output directory where the generated programs will be placed.

Related topics:


2000-2019 Norcom, all rights reserved 

TOC

Send feedback to Norcom