Abstract

In the commercial world today we see growing complexity and depth in the information we store. A simple example would be a custom product or order line that is itself made up of many other products each with a variety of purchasing or build options. Historically data input applications did not support this type of requirement very well.

This article describes how to solve this programming problem by creating, using and managing concurrent data inputs and displays in Genero.

Content

In a recent Genero development project (a modernization of a “green-screen” application originally developed in C/UNIX), the original application required the user to navigate through up to 8 input arrays in turn, even if you only wanted to see the last one.

Using the DIALOG feature in Genero helps us get round this problem by allowing the developer to create any number of active input or display arrays.

Example 1

The very simple code extract below shows 4 concurrent input arrays, coded individually but in a DIALOG.

Copy to Clipboard

The screenshot below shows how this might look for the application user.

concurrent data inputs and displays in Genero

All these input arrays are concurrently active, and one can switch between them without having to ‘accept’ or ‘cancel’ any of them. All the functionality availability for the input arrays is still there.

Important notes when considering this methodology:

  • DIALOG-level actions e.g. “Accept”, “Cancel”, “Exit” etc. cannot be performed on an individual array. User experience suggests that the benefits of this functionality strongly outweigh any disadvantages.
  • BEFORE INPUT will get executed every time you switch to a specific array, so if you want to set some defaults (and want these executed only ONCE), then do it in BEFORE DIALOG. As you might expect, this behaviour also applies to AFTER INPUT etc.

Example 2

In our example above all of the elements of the dialog are of the same type, but this doesn’t have to be the case. In the following screenshot, we see another part of the application where we are printing several orders in one go, from either a range and/or a list of order numbers, and to choose a layout format. Combining the two statements in a DIALOG means exactly the same as above; you can do it in just one hit, so to speak.

Copy to Clipboard

Example 3

Another situation is where you may need more input fields for one operation than will fit in a single screen. In this case the field display and input operation may be divided over a number of smaller sections separated by tab.

In Genero you can have multiple tabs in one form, and there is more than one way of handling them –

  • Have menu buttons to invoke the code to do the inputs in each tab individually
  • Use a single INPUT statement for all fields in all tabs
  • Include one INPUT statement per tab in a DIALOG statement

Some of the above may not be suitable for certain scenarios, but all do work as expected.

Copy to Clipboard
Or

Copy to Clipboard

If for instance you want to check the content of one tab before editing another then the first sample code above would be more appropriate (one could use BEFORE INPUT in the relevant INPUT statement), otherwise use the structure of the second sample, perhaps.

The Genero manuals are included in the IBM Knowledge Center – follow the link below, and then search for ‘multiple dialogs’.

https://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_fgl_Migrate_to_310_presentation_styles.html

Conclusion

Genero have upgraded 4GL to a GUI language with full modern functionality, but still with the original language structure and syntax. So upgrading the application from having to sequentially step through multiple inputs to having them all concurrently visible and active is simply using an extension of the existing code, rather than having to rewrite it. The ability to manage concurrent data inputs and displays in Genero is a great benefit for users and productivity.

Disclaimer

The code fix suggested above is provided “as is” without warranty of any kind, either express or implied, including without limitation any implied warranties of condition, uninterrupted use, merchantability, fitness for a particular purpose, or non-infringement.

Contact us

If you have any questions how to manage concurrent data inputs and displays in Genero, simply contact us.

Author