The panels "Work with Entry fields" and "Work with Formal parameters" mentioned in this section are special versions of the ones mentioned in the Work with entries section. Their functionality is restricted. Refer to "Work with Entry fields" and "Work with Formal parameters" for more general information on the subjects of Fields and Formal parameters.
The panel "Work with Entry fields" in the Generation of an Entry only allows option "7=Convert to valid ITP name" to be used. It does not allow any Field definitions to be created, changed, deleted, etcetera. The names initially used in the list of Fields are read from the file definition (DDS Name or TEXT)./ Refer to DID-source menu/Work with System values for more information. When de DDS TEXT is used this is most likely not a valid ITP name. Before the field can be added to the Entry its name must first be changed to a valid ITP name. This can be done automatically by using the option "7=Convert to valid ITP name" or manually by just entering a correct name in the list. If the name is still not a valid ITP name when the function key F20 = Add fields to entry is pressed or the name is not unique within the Entry the "Work with Entry fields" will display an error for this. If the name was incorrect ITP will also convert it to a valid name when displaying the error. After function key F20 = Add fields to entry is pressed and an error is displayed the option "7=Convert to valid ITP name" is no longer present, and the only way to change a field name is by manually changing it in the list.
The panel "Work with Formal parameters" in the Generation of an Entry only allows option "7=Convert to valid ITP name" and more importantly the options "4=Drop key field" and "6=Retrieve key field". Option "7=Convert to valid ITP name" is rarely used because the name initially used is read from the Field definitions which already have valid ITP Names. The dropping of key fields plays a crucial role in combination with the attribute that determines whether an Entry is Singular or Plural.
If an Entry is generated using a uniquely keyed file the panel "Work with Formal parameters" will initially list all the key fields of the file. With a uniquely keyed file this would mean that the Entry is Singular. With the ability to drop Formal parameters the Entry can be made Plural. This is best explained by an example: Suppose the file RELATION is uniquely keyed by the key field ID:
File: |
RELATION |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Keys: |
ID |
|
Id |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fields: |
TYPE |
|
Relation |
|
Type |
|
Relations |
|
Type |
|
|
ID |
|
|
|
Id |
|
|
|
Id |
|
|
NAME |
|
Singular |
|
Name |
|
Plural |
|
Name |
|
|
..... |
|
|
|
..... |
|
|
|
..... |
|
In the plural Entry Relations the key-field Id is dropped, thus resulting in an Entry with no Formal parameters that would retrieve all RELATION records from the database.
Note that it is only allowed to drop the last Formal parameters. Because a keyed database file is also sorted in the sequence determined by the keys, it could involve extensive programming to create the data retrieval program for such an Entry. ITP does not support this in *DBMS400 nor in the generation of data retrieval programs. Therefore, it is not possible to drop Formal parameters that are not the last Formal parameters of an Entry during the generation process.
Note
ITP does not support all DDS field types. Refer to Supported DDS field types for more information.