Getting Started with TRANSACT (32247-90007)

151
9 Creating Custom Applications
In this section, we look at coding techniques that use the power of Transact and
Dictionary/V. One of the most time-consuming functions of an application system's
programming team is program maintenance. Quite often this time is related to the kinds
of activity that can be greatly reduced or even eliminated by taking full advantage of the
integration of Transact and the dictionary.
Some of these time-consuming activities are: adding new input forms, changing or deleting
existing input forms, adding new data elements, deleting existing elements, or changing
existing elements in size.
We will follow through examples of localizing a program, that is, making it independent of
the form name and of the number of forms that execute the same code, independent of the
form contents, and provide user exits for additional processing. The changes we make
always apply to the dictionary. The changes become effective in the program when the
program is recompiled in order to pull in the new dictionary definitions.
An application system can be divided into at least two parts. The first part is made up of
the data that is needed by the system processing logic. This data or these data elements
are critical to the proper functioning of the system. For example, a manufacturing system
no doubt has an element called part-number which is a critical part of practically all
system transactions.
A typical application may have several critical data elements. It is fair to say that a
localizable application cannot allow critical fields to be deleted from the application.
Application programs rely upon these fields to be present in transactions.
However, a localizable application should allow these elements to be changed in size. It
should also allow the physical placement of these elements within an input form to be
changed.
The other part of an application is made up of noncritical elements. Many of these
elements may be supplied as a part of the original application, if for no other reason than
the typical generic application has these data elements. Other noncritical elements may be
added by the particular user of the application.
A localizable application should allow noncritical elements to be added, deleted, changed
in size, and changed in physical placement within an input form.
Also, generic transactions should be localizable. A generic transaction is defined here to be
a transaction that provides a basic function such as adding a customer or updating a
customer. For example, one organization may be responsible for adding new customers to
the database, but several organizations need to be able to update portions of the customer
data. Each organization should be provided with a form which only accesses the data they
need. The same program logic that provides customer update capability should be able to
handle any number of these variations.