Establishing INFORM/V Groups [ INFORM/V User's Guide ] MPE/iX 5.0 Documentation
INFORM/V User's Guide
Establishing INFORM/V Groups
It is possible, of course, to access databases directly through INFORM/V
without creating Groups. The user can be given access to any data set
that is defined in the data dictionary. Then why bother to establish
INFORM Groups? Because they provide a logical view of data as defined by
business needs. More specifically, there are three reasons for setting
up Groups:
1. To conceal the details of a data set or database structure from
the user.
2. To make data from an MPE or KSAM file available to INFORM/V users.
Data in MPE or KSAM files can only be accessed if it is related to
an INFORM Group.
3. To combine data elements from different files and data sets into
one reporting Group.
The real power of INFORM/V lies in the ability to pull together data from
various sources to create one reporting environment.
INFORM Groups follow the same hierarchical plan as other data dictionary
structures. At the top of the hierarchy is $MENU, which is the INFORM/V
parent Group. $MENU is automatically created for you when you initialize
your data dictionary. Other Groups are related to $MENU as child Groups.
Child Groups can in turn be parent Groups to other Groups. As many as
sixteen levels of nesting are allowed for subgroups under one Group.
Elements can be associated only with the lowest level child Groups. When
an INFORM/V user makes the Group and subgroup selections on the INFORM/V
menus, the user will be following the hierarchy of menus that you have
created in the data dictionary.
INFORM/V security allows you to specify which Groups and subgroups will
appear on which user's menus. If INFORM/V security is not established,
all Groups related to $MENU will appear on the INFORM/V Group Menu for
all users of the data dictionary; the next and all subsequent levels of
Groups will appear on INFORM/V Subgroup Menus for all users. (The effect
of INFORM/V security on the hierarchy of Groups is described at the end
of this section.)
The hierarchy of $MENU, Groups, subgroups, and elements is represented in
Figure 11-1.
Figure 11-1. The INFORM/V Hierarchy
The following paragraphs describe the way to set up a Group, first, for
the simplest case of a single file, then for two data sets, then three
data sets. These simple cases provide a vehicle for explaining the
DICTIONARY/V commands used and the mechanics of setting up INFORM/V for
users.
The discussion "Linking Files" then examines in detail the principles of
linking data sets and files - - both the default rules that INFORM/V uses
and the way in which you can control the linking process. These
principles become quite important when you are designing complex INFORM/V
Groups that combine many files with data sets, combine data sets from
different databases, or use intermediate data sets to serve as indirect
links between data sets.
Creating a Group from a File
To use data from an MPE or KSAM file in INFORM/V, you must create an
INFORM/V Group from the file. Though the data in databases can be
accessed directly, the data in MPE and KSAM files cannot.
You use the DICTDBM utility to establish an INFORM/V Group from a file.
The process requires three steps:
1. Use the CREATE command to create the Group.
2. Associate the appropriate elements with the Group via the ADD
command.
3. Use the RELATE command to establish the place of this Group within
the INFORM/V hierarchy.
For complete documentation of these commands, see the DICTIONARY/V
Reference Manual (32244-90001). The discussion here assumes that you are
familiar with the commands and their options.
For example, assume that you want to create a Group from a KSAM file
called CREDIT that contains the following data elements:
ACCOUNT-NUMBER
CREDIT-CODE
MAX-CREDIT
After verifying that the data elements already exist in the data
dictionary and that all are associated with a file, invoke the dictionary
maintenance utility and issue the command
CREATE GROUP
The name that you supply for GROUP is the one that will be displayed on
the Group Menu. All the other prompts are optional in this situation.
Figure 11-2 shows an example of the prompts that will be displayed and
the user's responses. The user establishes the Group called CREDIT and
chooses to give it a DESCRIPTION.
____________________________________________________________
| |
| > CREATE GROUP |
| GROUP CREDIT |
| LONG NAME |
| TYPE |
| RESPONSIBILITY |
| DESCRIPTION CREDIT STATUS BY ACCOUNT NUMB|
| > |
____________________________________________________________
Figure 11-2. Prompts to Create a Group
The next step is to associate the elements that you want to appear as
data names on the Data Names Menu with the Group. The ADD command is
used for this purpose. An example of the command and the prompts is
shown in Figure 11-3. In this case, the user wants the Group to contain
only two of the three data elements that are in the file.
_____________________________________________
| |
| > ADD GROUP |
| GROUP CREDIT |
| |
| ELEMENT ACCOUNT-NUMBER|
| ELEMENT ALIAS |
| FILE |
| VALUE AS A LINK |
| DISPLAY ELEMENT ON MENU (Y/N)? |
| DESCRIPTION |
| |
| ELEMENT CREDIT-CODE |
| ELEMENT ALIAS ! |
| |
| ELEMENT |
| > |
_____________________________________________
Figure 11-3. Associating Elements with the Group
The only prompts to which you must respond when making up a Group from a
single file are
GROUP
ELEMENT
The other prompts become important when data for a Group is taken from
more than one file, and they will be discussed later in that context.
The final step is to use the RELATE command to define the place of the
Group within the hierarchy. In the example in Figure 11-4, the Group
just created is related to $MENU as the parent. The Group CREDIT will
therefore be displayed on the Group Menu when the user invokes INFORM/V.
_____________________________________
| |
| > RELATE GROUP |
| PARENT GROUP $MENU |
| |
| CHILD GROUP CREDIT|
| DESCRIPTION |
| |
| CHILD GROUP |
| |
| > |
_____________________________________
Figure 11-4. Relating the New Group to the Hierarchy
After the three steps are completed, it is advisable to check the work
just done. The example in Figure 11-5 uses the SHOW command to do this.
________________________________________________________________________________
| |
| > SHOW GROUP |
| GROUP CREDIT |
| |
| GROUP TYPE: RESPONSIBILITY: |
| CREDIT |
| |
| ELEMENT(ALIAS): PROPERTIES: ELEMENT(PRIMARY):|
| ACCOUNT-NUMBER X (10,0,10) ACCOUNT-NUMBER |
| CREDIT-CODE X (10,0,10) CREDIT-CODE |
| |
| |
| > |
________________________________________________________________________________
Figure 11-5. Displaying the New Group
If you need to change a Group after it has been established, use the
MODIFY, CHANGE, or UPDATE command. These commands are all fully
documented in the DICTIONARY/V Reference Manual.
Creating a Group from Two Files or Data Sets
You may find that users frequently need to generate reports from
information contained in more than one file or data set. The most
important thing to remember in defining INFORM Groups across files is
that files are linked through common elements and that, for data sets and
KSAM files, the common element must be a search item or key item in the
file being linked to. In other words, in order to take data from file A
and file B, the two files must have a data element in common.
For example, consider the two data sets shown in Figure 11-6.
Figure 11-6. Two Data Sets Used to Create a Group
Assume that from these two data sets the user wants to create one Group
called INVENTORY. For simplicity, assume that all elements are to be used
from both data sets. The two sets have in common the element called
ITEM-NUMBER, and that element is a search item in the data set
INVENTORY-MASTER. (Search items are marked by an asterisk in all
figures.)
The process of creating the Group involves the same three steps described
earlier for creating a Group from a file: (1) create the Group, (2)
associate the elements with it, and (3) establish its place in the
hierarchy. However, the responses to the prompts are slightly different.
An example of the first step in the process is shown in Figure 11-7.
Here the user names the Group being created INVENTORY. The response to
all other prompts is optional.
________________________________________
| |
| > CREATE GROUP |
| GROUP INVENTORY|
| LONG NAME |
| TYPE |
| RESPONSIBILITY |
| DESCRIPTION |
| |
| > |
| |
| |
| |
| |
________________________________________
Figure 11-7. Creating Another Group
The association of elements with the Group is shown in Figure 11-8. This
step is very similar to that shown in Figure 11-3, when a Group was being
established from a single file.
__________________________________________
| |
| > ADD GROUP |
| GROUP INVENTORY |
| |
| ELEMENT PART |
| ELEMENT ALIAS |
| FILE |
| VALUE AS A LINK |
| DISPLAY ELEMENT ON MENU (Y/N)? |
| DESCRIPTION |
| |
| ELEMENT ITEM-NUMBER|
| ELEMENT ALIAS ! |
| |
| ELEMENT COST |
| ELEMENT ALIAS ! |
| |
__________________________________________
Figure 11-8. Associating Elements from Two Data Sets with a Group
One of the elements in this Group, ITEM-NUMBER, is located in both files.
By default, INFORM/V will take the data for this element from the detail
set. If you want to force INFORM/V to take the values from the master
set, you can do so be supplying the master set file name in response to
the FILE prompt. Which file is used may affect what data is included in
the report. The discussion "Linking Files" later in this section
describes in detail the factors involved in specifying the file for any
element.
___________________________________________
| |
| ELEMENT PRICE |
| ELEMENT ALIAS ! |
| |
| ELEMENT LINE |
| ELEMENT ALIAS PRODUCT LINE|
| FILE ! |
| |
| ELEMENT LOCATION |
| ELEMENT ALIAS ! |
| |
| ELEMENT QTY ON HAND |
| ELEMENT ALIAS QTY_ON_HAND |
| FILE ! |
| |
| ELEMENT |
| |
| > |
| |
| |
| |
| |
___________________________________________
Figure 11-8. Associating Elements from Two Data Sets with a Group (continued)
When adding the element LINE, the user specifies the alias PRODUCT LINE.
This more meaningful name for the element will appear on the Data Names
Menu. An alias is also specified for the element QTY-ON-HAND. Note that
an alias specified when adding elements to a Group applies only to the
INFORM/V Data Names Menu. It should not be confused with aliases used in
other contexts by DICTIONARY/V.
The next step is to establish the place of this Group in the hierarchy.
An example of the interaction is shown in Figure 11-9. Since the Group
INVENTORY is to be a subgroup, it is first identified as a child of the
parent Group MFG MANAGER, then the Group MFG MANAGER is identified as a
child of the parent Group $MENU.
__________________________________________
| |
| > REPEAT RELATE GROUP |
| PARENT GROUP MFG MANAGER|
| |
| CHILD GROUP INVENTORY |
| DESCRIPTION |
| |
| CHILD GROUP |
| |
| PARENT GROUP $MENU |
| |
| CHILD GROUP MFG MANAGER|
| DESCRIPTION |
| |
| CHILD GROUP |
| |
| PARENT GROUP |
| |
| > |
| |
| |
| |
| |
__________________________________________
Figure 11-9. Establishing the Hierarchy for a Subgroup
The Data Names Menu for the INFORM Group established by Figure 11-7
through Figure 11-9 is shown in Section 10 (Figure 10-2).
The final step is to check the new Group with the SHOW command. Figure
11-10 shows the Group INVENTORY.
________________________________________________________________________________
| |
| > SHOW GROUP |
| GROUP INVENTORY |
| |
| GROUP TYPE: RESPONSIBILITY: |
| INVENTORY |
| |
| ELEMENT(ALIAS): PROPERTIES: ELEMENT(PRIMARY):|
| PART X (6,0,6) PART |
| ITEM-NUMBER U (4,0,4) ITEM-NUMBER |
| COST 9 (6,2,6) COST |
| PRICE 9 (6,2,6) PRICE |
| PRODUCT LINE X (10,0,10) LINE |
| LOCATION X (4,0,4) LOCATION |
| QTY ON HAND 9 (10,3,10) QTY-ON-HAND |
| |
| |
| > |
| |
| |
| |
| |
________________________________________________________________________________
Figure 11-10. Checking the Subgroup Inventory
Creating a Group from Three or More Files
It is possible to link three, four, or even more files to produce one
INFORM Group. It is also possible to link through files from which you
show no elements on the Data Names Menu. Both possibilities are simple
extensions of the techniques already described.
For example, consider the three files (data sets) shown in Figure 11-11.
These data sets are similar to the ones shown in Figure 11-6, but in this
case one of the elements that is to be included, LOCATION, is not in the
detail set, but is instead in a third set called LOCATION-MASTER. It is
linked to the detail set through the common element called LOCATION-CODE.
Figure 11-11. Three Data Sets Used to Create a Group
If the user wants to create the same Group that was established in Figure
11-7 through Figure 11-9, the procedure would be almost the same as in
those figures. The CREATE step (Figure 11-7) and the RELATE step (Figure
11-8) would be identical. The only differences would be in adding
elements to the Group; that is, there will be one additional element
added in the ADD GROUP interaction in Figure 11-8.
The additional element LOCATION-CODE must be defined to link ITEM-NUMBER
in the detail set to LOCATION in the second master set. LOCATION-CODE
can be used as a link item because it is a search item in the set
LOCATION-MASTER. The additional interaction is as follows:
ELEMENT LOCATION-CODE
ELEMENT ALIAS
FILE
VALUE AS A LINK
DISPLAY ELEMENT ON MENU (Y/N)? N
DESCRIPTION
Notice that in this case the user responds N to the prompt to display the
element on the menu. The element LOCATION-CODE is to serve only as a
link to the element LOCATION in the third set, and will not be displayed
on the Data Names Menu.
MPE/iX 5.0 Documentation