GUI ScreenIO for Windows

 ScreenIO.com


Master code

Master statements are used in the template to label the shells of complete COBOL programs (or COBOL SECTIONs). 

The master contains COBOL statements, plus template statements that cause the code generator to selectively include optional code blocks in the generated code, depending on the type of panel and its content.

General format

    %name:type

where name is the name of the master.

Remarks

Type Description
PROG-MAIN: Defines the outline of a complete program.

Behavior of program generator:

If the main option is selected, copy the code that follows this statement to the generated program file, including optional code blocks as directed by other template statements.


%name:PROG-MAIN:


Example:

%MAIN:PROG-MAIN:
       IDENTIFICATION DIVISION.
       PROGRAM-ID. '@@PROGRAM-NAME@@'.
       DATE-COMPILED.
      * This shell program was generated by the GS2000 program
      * generator utility for use with GUI ScreenIO.
      * For.........: @@COMPANY-NAME@@
      * By..........: @@USER-NAME@@
      * Date Started: @@MM/DD/CCYY@@
      *
FIX-->* Description.: (description of this program goes here)
FIX-->*-->          :
      *
       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       SOURCE-COMPUTER. IBM-PC.
       OBJECT-COMPUTER. IBM-PC.
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01 V--VERSION-LEVEL PIC 9(3) VALUE 1.
       01 PROGRAM-NAME PIC X(8) VALUE '@@PROGRAM-NAME@@'.
      *
      * ------------------------: Copybooks for GUI ScreenIO panels.
      *
           COPY "C:\Program Files\GUI ScreenIO\template\TESTMAIN.COB".
!!INCLUDE:PANEL-COPYBOOKS
#
# SWITCHES-DATA is a block that defines WORKING-STORAGE
# used in conjunction with some controls.
#
!!INCLUDE:SWITCHES-DATA
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       PROCEDURE DIVISION.
       0100-MAIN-LINE-LOGIC SECTION.
      * -====-
       0101-INITIALIZATION.
      * ------------------------: Initialize; create the main window.
           PERFORM DISPLAY-MAIN.
      *
      * ------------------------: PERFORM paragraph to handle the panel.
      *
           PERFORM DISPLAY-@@PANEL@@.

      * ------------------------: Finished; close the main window.
           SET TESTMAIN-DO-CLOSE TO TRUE.
           PERFORM DISPLAY-MAIN.
           STOP RUN.

*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       0200-DISPLAY-PANELS SECTION.
      * -====-
       DISPLAY-MAIN.
           CALL 'GS' USING TESTMAIN-1
                           TESTMAIN-2
                           TESTMAIN-3
                           TESTMAIN-4.

      * ------------------------: One paragraph per panel to define the
      *                         : logic to display the panel and handle
      *                         : events returned to it.
!!INCLUDE:DISPLAY-PANEL

PROG-MODULE: Defines the outline of a subroutine.

Behavior of program generator:

If the subroutine option is selected, copy the code that follows this statement to the generated program file, including optional code blocks as directed by other template statements.


%name:PROG-MODULE:


Example:

%SUBROUTINE:PROG-MODULE:
       IDENTIFICATION DIVISION.
       PROGRAM-ID. '@@PROGRAM-NAME@@'.
       DATE-COMPILED.
      * This shell program was generated by the GS2000 program
      * generator utility for use with GUI ScreenIO.
      * For.........: @@COMPANY-NAME@@
      * By..........: @@USER-NAME@@
      * Date Started: @@MM/DD/CCYY@@
      *
      * Description.: (description of this program goes here)
      *             :
      *             :
       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       SOURCE-COMPUTER. IBM-PC.
       OBJECT-COMPUTER. IBM-PC.
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01 V--VERSION-LEVEL PIC 9(3) VALUE 1.
       01 PROGRAM-NAME PIC X(8) VALUE '@@PROGRAM-NAME@@'.
      *
      * ------------------------: Copybooks for GUI ScreenIO panels.
      *
!!INCLUDE:PANEL-COPYBOOKS
#
# SWITCHES-DATA is a block that defines WORKING-STORAGE
# used in conjunction with some controls.
#
!!INCLUDE:SWITCHES-DATA
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FIX-->*LINKAGE SECTION.
      *
FIX-->* Define your LINKAGE-SECTION arguments here.
      *
FIX-->*01  arguments
FIX-->*--> 05 FILLER PIC X.
      *
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       PROCEDURE DIVISION
FIX-->*PROCEDURE DIVISION USING arguments
                         .
       0100-MAIN-LINE-LOGIC SECTION.
      * -====-
       0101-INITIALIZATION.
      *
      * ------------------------: PERFORM paragraph to handle the panel.
      *
           PERFORM DISPLAY-@@PANEL@@.

           GOBACK.

*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0200-DISPLAY-PANELS SECTION.
!!INCLUDE:DISPLAY-PANEL

PROG-SECTION: Defines the outline of a COBOL SECTION.

Behavior of program generator:

If the SECTION option is selected, copy the code that follows this statement to the generated program file, including optional code blocks as directed by other template statements.


%name:PROG-SECTION:


Example:

%SECTION:PROG-SECTION:
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       0200-DISPLAY-PANELS SECTION.
      *
FIX-->*--> Move the following lines to WORKING-STORAGE.
FIX-->*
FIX-->* ------------------------: Copybooks for GUI ScreenIO panels.
      *
!!INCLUDE:PANEL-COPYBOOKS
!!INCLUDE:SWITCHES-DATA

      * ------------------------: One paragraph per panel to define the
      *                         : logic to display the panel and handle
      *                         : events returned to it.
FIX-->* You will need to PERFORM these paragraphs from your main
FIX-->* logic to display the panels!
!!INCLUDE:DISPLAY-PANEL


© 2000-2019 Norcom, all rights reserved 

TOC

Send feedback to Norcom