Menu

Components for a functional GnuCOBOL panel generator - No Screen Section - No Display / Accept

GnuCOBOL
2025-07-04
2025-07-06
  • Ralph Linkletter

    I attempted to email this to Eugenio, Chuck, Arnold, Mr. White
    No luck Gmail rejected all,
    The 7zexe file is actiually a 7Z file - a rename is required :-)

    The attached 7zexe file contains all the components needed to make and use a panel.
    This is exclusively windows. This is exclusively a 32 bit GnuCOBOL
    The programs will need to be modified to set the directory of the PANELS elements of the 7z.
    There is currently reference to \WINZOS\PANELS contained within the .COB modules

    ZOSPI042 is only provided in .DLL form (albeit the .DLL is a GnuCOBOL program)
    I provided CBL_ROUTINES in 32 bit .DLL format

    Compile the modules
    C:\APANEL>cobc -x -fnotrunc apanel.cob
    C:\APANEL>cobc -m -fnotrunc zpandef.cob
    C:\APANEL>cobc -m -fnotrunc zgenpan.cob
    C:\APANEL>cobc -m -fnotrunc zhex2bin.cob

    Execute ZPANDEF
    ZPANDEF GENTEST6

    I did not create a copy book for the output of above
    Instead the output will be found in PANELS\AUDITPAN.TXT
    I did so such that y'all can see what is constructed for interfacing to the panel executive ZOSPI042.DLL

    Compile APANEL
    cobc -x -fnotrunc APANEL.COB

    Execute APANEL
    APANEL

    This will be a very very different method to define a panel, display the panel, and interact with the panel.
    After the call to ZOSPI042 the data input / updated on the PANEL will be populated in ZOSPI042-USER-FIELDS.
    Manipulation of COLOR, cursor placement, protect / unprotect is done by populating the data fields in PI042-DYNAMIC-FIELDS.
    These are some of the differences in the way this panel interaction differs from the traditional SCREEN SECTION paradigm
    * This is a very different screen handler paradigm to non zOS COBOL programmers.
    * All data fields are input by a user before the program interacts with the data.
    * All data fields defined in the panel are made available when the panel user hits the Enter key or F1 - thru f12.
    * All data fields are character (PIC X).
    * The application program is tasked with numeric verification, right justify, left justify, the creation of working storage data fields that are scaled by decimals, zero suppression
    * The terminal interface is fixed with respect to arrow keys, delete, insert, back space, tabs . . .
    * The terminal interface and presentation has been used by millions (billions ?) of zOS application programs users for eons.

    Whether CICS, ISPF Dialog Manager, IMS the terminal interface is universal with zOS users (the personnel who input claims data, inventory, sales order entry, banking, financial . . . )
    GnuCOBOL can now create a UI that is familiar to many without the encumbrance of ISPF, CICS, IMS, TN3270 subsystems.

    I will certainly provide hands on support for anyone using this paradigm

    Ralph

     

    Last edit: Ralph Linkletter 2025-07-04
    • Mickey White

      Mickey White - 2025-07-04

      Note: I did receive the email and the attached 2 files. FYI
      Thanks!

       
      • Arnold Trembley

        Arnold Trembley - 2025-07-05

        I also received the email and was able to detach the files. Thanks very much!

         
  • Ralph Linkletter

    I have made some updates for usability sake.
    The dynamic mods area includes a redefines structure.
    Each of Cursor, Color, Protect are prefixed with the row and column from the panel painting.
    Why did I do this ?
    Consider R02C13 (row 2 column 13)
    Editing the sample screen the data field at R02C13 is the data field COBOL NAME
    Replace all "R02C13" in the copybook with "COBOL-NAME"
    COBOL-NAME-COLOR
    COBOL-NAME-CURSOR
    COBOL-NAME-PROTECT
    and
    The data field is now named as COBOL-NAME

    If you want to change the COLOR of COBOL-NAME
    Move 14 to COBOL-NAME-COLOR

    The improved DSECT from the APANEL example:

               05  PI042-DYNAMIC-FIELDS.
                   10  PI042-ATTRS-COLORS OCCURS 025 TIMES.
          * ----------------------------------------------------------------
          *  SET CURSOR TO 'E' TO PLACE CURSOR AT THIS FIELD- X'00' TURN OFF
          * ----------------------------------------------------------------
                       15 PI042-CURSOR         PIC X.
          * ----------------------------------------------------------------
          *  COLORS 0 - 15 BLACK TO BRIGHT WHITE 14 YELLOW RED 12 TURQU 11
          * ----------------------------------------------------------------
                       15 PI042-COLOR          PIC 9(4) COMP-5.
          * ----------------------------------------------------------------
          *  SET PROTECT TO 'P' TO  PROTECT A FIELD - X'00' UNPROTECTS FIELD
          * ----------------------------------------------------------------
                       15 PI042-PROTECT        PIC X.
               05  PI042-MODS REDEFINES PI042-DYNAMIC-FIELDS.
                   10  R01C01-CURSOR PIC X(01).
                   10  R01C01-COLOR PIC 9(04) COMP-5.
                   10  R01C01-PROTECT PIC X(01).
    
                   10  R01C42-CURSOR PIC X(01).
                   10  R01C42-COLOR PIC 9(04) COMP-5.
                   10  R01C42-PROTECT PIC X(01).
                   .
                   .
                   .
    

    Attached is the updated version

     
  • Ralph Linkletter

    Attached is the 64 bit compiled version of ZOSPI042.
    It is attached as ZOSPI042.64 please rename to ZOSPI042.DLL
    Using Chuck's 64 bit GunCOBOL from his DROPBOX URLand the source compiled from the first post should result in APANEL.EXE executing with a 64 bit GnuCOBOL.

    Per my usual closing comment on a 64 bit GnuCOBOL - I always ask why ?
    I am personally still awaiting any kind of practical zOS application COBOL program that requires more than 2GB of address space :-)

    I have not tested the 64 bit components.
    I installed Chuck's 64 bit GnuCOBOL, compiled the ZOSPI042.COB source into a 64 bit .DLL.
    Then deleted the 64 bit GnuCOBOL - all 1 Gigabyte of it :-)

    Ralph

     

    Last edit: Ralph Linkletter 2025-07-06

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.