Dave Higgins Consulting
Strategic Technology Consulting and Enterprise Architecture

Home | What's New | What's Old | Articles | Associates | Interesting Links | Cool Stuff


Logical Output Mappings 

Introduction 
The creation of the Logical Output Mapping (LOM) is the third of seven steps in program design.

Step Three: Create a Warnier/Orr diagram depicting the structure of the process for creating the logical output from the logical input. This Logical Output Mapping can be built from information gathered on the Output Definition Form, from the Logical Output Structure, and from the Logical Data Structure.

Unlike the LOS and LDS, the Logical Output Mapping will be a Warnier/Orr diagram depicting processing activities rather than data elements. Thus, the elements shown (the features which do not break down into sets) will be elementary actions or processes, not data elements.

Additionally, the LOM contains "placeholder" sets for related groups of instructions (usually at the beginning and ending of a level of hierarchy which contains other levels). These placeholder sets are not present on data structure diagrams such as the LOS and LDS, but are handy when developing processing structures.

Developing the LOM 
The Logical Output Mapping is built in two stages:

1) Begin with the structure of the LOS 
_____1a) Add any "hidden" sets from the LDS. 
_____1b) Add any sets necessary for calculations. 
_____1c) Add "placeholder" sets where necessary.

In other words, any set present on the Output Definition Form (either an Output Frequency, an Input Frequency, or a Calculation Frequency) will be present on the LOM hierarchy.

2) Add to the structure: 
_____2a) Output Actions (one for each group of data on the LOS) 
_____2b) Calculations (from the Output Definition Form) 
_____2c) Input Actions (one for each group of data on the LDS)

These two steps are explained in detail in the following sections.

Step One: The Structure 
We begin development of the LOM by starting with the hierarchy of the LOS. For the example output we have been following, that hierarchy is as follows.

Next, the Output Definition Form is examined to see if there are any Input Frequencies different from the Output Frequencies (the "hidden hierarchies" that are found on ill-behaved outputs). If there are any "hidden hierarchies, we add them to the structure.

We also look for any calculations which are done with a frequency different from those present on the structure (Calculation Frequencies which are different from either Output Frequencies or Input Frequencies). If there are any, they are also added to the basic hierarchy (if, for instance, there was a calculation to count the number of "major clients"--those with a billing greater than $1,000--the statement "add 1 to major client count" would be done with a frequency of "once per major client": thus "major client" would be an alternative set added inside the "client" level of hierarchy).

For the example we have been following, there are no additional sets present in either the Input Frequencies or the Calculation Frequencies. Therefore the hierarchy of this LOM is exactly the same as the hierarchy of the LOS.

Then, "placeholder" sets are added at the beginning and ending of each set which is subdivided by another, as follows.

Other placeholder sets are sometimes needed, and those occasions are explained in a later section.

Step Two: The Actions 
Output Actions
 
First, add to the structure a logical "print" or "write" statement for each group of elements on the Logical Output Structure (a logical group of elements are those that are all output the same number of times and under the same circumstances). For the example output there are five such groups: one each for the beginning and ending of the Firm level, one each for the beginning and ending of the Attorney level, and one for the Client level.

Calculations 
Next, add all logical calculations from the Output Definition Form...

Although it doesn't matter in this example, make sure that any calculations which must be reflected in the logical output are done before the output statement; when output data is used for subsequent calculations the order of the logical "print" statement and the logical calculation may not matter (as is the case here).

Also notice that the Attorney Name(e) (the name of the attorney printed at the end of each attorney) must be saved at the beginning of each attorney. The reason will become clear if you think about it a little: if you wait until the end of the attorney to save the name, you will have already read ahead to the next attorney, and the attorney name will be the wrong one.

Input Actions 
Finally, add input actions to the structure, assuming that there is one logical record available for each different group of data on the LDS...

Notice that in general, the "get" statements are at the beginning of a level (before any other actions), except for the lowest level "get" (in this case, "Get Client Data"). We will assume for the purposes of logical design that either the "Get Firm Data" or "Get Attorney Data" will load the data for the very first Client (and that will depend on the organization of the actual physical files which are available--which will be covered in the section on Physical Input Mappings).

Traditional Programs 
You may find it interesting to compare the Logical Output Mapping just developed to the following traditional "structured" solution to the same problem...

The above program illustrates traditional "level break" processing, and has been used by many programmers for many years. Notice that although it works the same way, it is not nearly as easy to understand or modify as the Logical Output Mapping.

This is a graphic example of the difference between a traditional "structured" program and a "data structured" program: the structure of the LOM is the same as the structure of the data. And although "structured" programs are better than "unstructured" programs, notice that "data structured" programs are better still.

Establishing "Placeholder" Sets 
A "placeholder" set is always placed at the beginning and ending of a level of hierarchy if that set contains another set. Therefore for the hierarchy...

we add a "Firm Begin" and "Firm End" set to the Firm level (since it contains the Attorney level); we add an "Attorney Begin" and "Attorney End" set to the Attorney level (since it is subdivided by the Client level). The Client level contains no other sets, therefore no "Client Begin" or "Client End" set is added to it.

A placeholder set is also added between two sets which occur sequentially inside a level. This is illustrated in the following example...

The placeholder set "Company Middle" is added between the repeating sets Order and Shipment, since they occur sequentially within the Company level.

Note that there can be multiple "middle" sets if there are three or more sequential sets within a level. We tend to name them "Middle 1," "Middle 2," and so on.

The rules for placing placeholder sets when alternation is present within a level are the same as those for repetition. The following is a correct placement of placeholder sets for the example shown.

Empty Placeholder Sets 
If any of the placeholder sets remain empty at the conclusion of the LOM process, one of two things may be done. Either the statement "Skip" can be entered in the set, indicating that there is no processing to be done for that set, or the empty set may simply be removed from the diagram. (Note that if you eventually intend to generate COBOL code from the diagram, enter the word "Exit" instead of "Skip" for an empty set).

Removing the empty sets will often remove unnecessary "clutter" from the diagram and eventually generate less code; the drawback is one of maintainability: if the set is left on the diagram future actions may be added to it easily. Leaving the empty sets on the diagram with the "skip" (or "exit") statement often makes the diagram easier to modify, at the expense of having a larger diagram and eventually generating more code.

The decision to leave the empty sets on the diagram or to remove them is one which you should not spend a lot of time on; the tradeoff of benefits is approximately equal.


Previous Section | Next Section

Home | What's New | What's Old | Articles | Associates | Interesting Links | Cool Stuff

 

This web site and all material contained herein is Copyright ©2002-2009 Dave Higgins. All Rights Reserved. For additional information, please contact me at:
Dave Higgins  · 6215 Parkers Hammock Rd · Naples, FL  34112
239-234-6033 · 239-234-6034 fax · 816-392-4575 cell ·
dave@davehigginsconsulting.com
or message me on ICQ: 5168581 or AIM: HigginsD01