[Access to Wang masthead]

A Classic Tool

From humble USERAID beginnings, EZFORMAT approaches cult status

From "VS Workshop",  Access to Wang, November 1991
  [ Prior Article ]     [ Return to the Catalog of articles ]     [ Next Article ]  

It seems like some very simple programming tools create an interest in others that causes them to build other tools to extend the concept further. EZFORMAT is one of those tools. Created early in the life of the VS, it remains one of the more popular items for utility mavens to create spin-offs. Like many other strong programming tools for the VS, EZFORMAT started life as a USERAID but is now supported by Wang Labs. A derivative screen tool - NEWEZFMT - attempted to extend the functionality of the original utility but proved too buggy to be of real use.

For new VS users, a close examination of the capabilities of EZFORMAT is recommended. Some of the power of this screen prototyping tool will be shown here; the VS System Utilities Reference from Wang (publication 715-0421) provides further understanding of its capabilities. System administrators and non-programmers should pay particular attention to the menu and data entry options provided directly from EZFORMAT and indirectly by other programs.

All programs named below are either VSAIDS - distributed by the United States Society of Wang Users - or are supported by Wang with recent operating system releases. Older versions may also be found in USERAID or USERAIDS libraries on your system.

Generating EZFORMAT screens

The first product of EZFORMAT is a screen image file, commonly known as a SAVE file because of the default library location of uidSAVE. SAVE files are consecutive files with a record length of 1920 bytes - the number of characters on a VS screen (e.g. 80 columns by 24 rows). Within this screen image file there is text, field definitions, and space for Field Attribute Characters (FACs) to control the field entries. Screen image files are usually created by "painting" the text and field areas on the screen - the primary purpose of EZFORMAT.

The language support options of EZFORMAT include COBOL, Assembler, BASIC, and RPGII; all use the screen fields to create source code that can be copied into a program. Other EZFORMAT options create other products. If the MENU options is used, there is a second record in the SAVE file with the names of the programs to be selected by the associated PF keys. The DATENTRY option adds a second file that describes the field names (typically stored in the uidFLDS library) that ties field locations to entries in a CONTROL file.

Most programmers that use EZFORMAT save their screen files for later modification. If you lose this file, the PRT2SAVE utility (a VSAID) allows you to recreate the SAVE file from a screen dump print listing. Operation is simple: enter the name and location of the screen dump and the output location for the SAVE file. (Note that the OUTPUT screen requires an entry for the record count; enter one for the language options, two for the MENU option.)

The Wang DATENTRY utility offers another means of creating EZFORMAT files. From the main menu of DATENTRY, press PF8 to create a SAVE file and the associated FLDS file. With these two products it is very simple to use the DATENTRY option of EZFORMAT to generate COBOL or RPGII program source.

Supporting language development

Once created, SAVE files can be used in a variety of ways. By themselves, SAVE files can be used to generate program source. SAVE files can also be used within program generators. The Wang COBGEN utility accepts SAVE files to generate the source code required to use the screen, including the screen definition and access routines to read and write. Up to sixteen screens may be defined in a single program.

The MENUGEN utility (a VSAID) uses SAVE files with the MENU option to create a COBOL menu program. The generated program operates in a similar manner to the Assembler programs generated directly by EZFORMAT: the programs to be controlled by the menu must be in the system library or in the same library as the menu's object file. The generated program can also generate a call to the SMF utility to log program usage. MENUGEN has two differences of syntax in the PF key assignments: for a program run screen, use RUN instead of USERPROG; to exit the menu and return to the previous program use EXIT instead of return.

Prototyping applications

EZFORMAT was designed to allow programmers to specify a single screen and generate the code to create that screen. There are many times, though, when it is desireable to look at a group of screens and model the interactions between them. There are two VSAIDs that perform in this manner: SHOWSCRN and DSGNAID.

SHOWSCRN displays all of the screens in a SAVE library in name order and allows each to be printed or edited. To use, enter the name of the SAVE library and the action to be performed (display, first, last, next, previous, find screen, print, delete screen). All of the menu's PF keys are also available while the screens are displayed; for example, press PF5 to show the next screen in the library. Each screen is displayed as it would appear in a program, and field edits (numeric, upper case, etc.) act accordingly.

The primary purpose of SHOWSCRN is to allow easier review and maintenance of SAVE libraries, but it can also be used as a presentation tool, as shown in an earlier column (see "VS Workshop", Access, December 1989). To prototype an application, the screen files would have to be located in a single SAVE library and ordered by name, and the presentation would follow a single order, rather than allowing jumps among the screens.

DSGNAID takes the prototyping concept further by creating links between screen files so that realistic screen interactions can be modelled. It creates a file of those relationships - know as a LOGIC file - and controls the branching to other screen files. In other words, DSGNAID models most of the behavior of the actual application.

One of the reasons DSGNAID is seldom used is because it is poorly documented. As a means of alleviating that problem, here is a description of a prototyping session:

DSGNAID also offers printing options that show the screen format, a title, a figure number, the PF key bindings, and several lines of comments. A valuable tool for program development.

I'm curious how much prototyping is used in the VS community. If you use prototyping approaches in your system development, please write me at the address below. I will share the information I receive.


Figure 1: EZFORMAT Selection Menu


              Wang VS Screen Prototyping Utility - Version 1.12.03

                                 SELECTION MENU

        Enter the logic flow file to be used for this prototyping session

      FILE     =  ********      LIBRARY  =  DSBLOGIC      VOLUME =  SYSTEM



  ----------------------------------------------------------------------------
              Please select the processing option:

              PF1  Prototype - Prototype an existing application
              PF2  Create    - Create and prototype a new application

              PF9  Copy      - Create a copy of this prototype and its screens
              PF10 Set       - Set Screen Format options for this application
              PF12 Run       - Execute programs or procedures


              PF15 Print     - Print screens / Set print options

              PF16 Exit      - Exit program

Figure 2: EZFORMAT Prototype Options Menu


              Wang VS Screen Prototyping Utility - Version 1.12.03

                              PROTOTYPE OPTIONS MENU

      The current screen is: SCREEN1 in library: DSBSAVE  on volume: SYSTEM


                    SELECT THE PFKEY FOR THE DESIRED FUNCTION

                       PFKEY                         ACTION
     -------------------------------------------------------------------------
                         1                 Return to prototype mode
                         2                 Modify current screen
                         3                 Add or Modify enabled Pfkeys
                         4                 Add or Modify screen comments
                         5                 Strip all FAC's from current screen


                         12                Run programs or procedures

                         15                Print current screen
                         16                Exit prototyping mode

Figure 3: EZFORMAT PF key options


              Wang VS Screen Prototyping Utility - Version 1.12.03

        Definition of the action to be taken when PFKEY 14 is struck from
        the current screen: SCREEN1* in library: DSBSAVE* on volume: SYSTEM

  PRESS PF1   to return to prototyping


=============================================================================
  PRESS ENTER to define the screen for PFKEY 14 to the logic flow file.
              SCREEN1  = ********  in LIBRARY1 = DSBSAVE*  on VOLUME1 = SYSTEM
              If the screen does not exist, ENTER creates an empty screen
                                  ---   OR   ---
              If the screen does not exist, PF3 will create a copy from
              SCREEN2  = ********  in LIBRARY2 = ********  on VOLUME2 = ******
  -----------------------------------------------------------------------------
  PRESS PF5 to review the entered Save library and volume for a screen. Each
            screen from this library will be displayed in sequence by pressing
            enter. PF1 will define the screen in the same manner as pressing
            ENTER above. PF16 will return to this menu.
              LIBRARY3 = ********     VOLUME3 = ******
  -----------------------------------------------------------------------------
  PRESS PF12  if this PF key will return the user to the prior screen
    In addition, also specify the number of screens to return: 01
  PRESS PF16  if this PF key will terminate the program

  [ Prior Article ]     [ Return to the Catalog of articles ]     [ Next Article ]  


Copyright © 1991 Dennis S. Barnes
Reprints of this article are permitted without notification if the source of the information is clearly identified