Field

This document covers the following topics:


Field Maintenance

The Field Maintenance Menu is called with MAINTAIN ELEMENT.

Overview of Field Maintenance Functions and Commands

Function Code Command
Add a field A ADD ELEMENT
Copy field C COPY ELEMENT
Display field D DISPLAY ELEMENT
Modify field M MODIFY ELEMENT
Rename field N RENAME ELEMENT
Purge field P PURGE ELEMENT
Redefine field R REDEFINE ELEMENT
Browse through fields of a file B BROWSE ELEMENT
Move field within a file H MOVE ELEMENT
Link children L LINK ELEMENT <active-association-type>
Edit owners of a field O EDIT ELEMENT OWNER
Select field from a list S SELECT ELEMENT
Edit description of a field W EDIT ELEMENT DESCRIPTION
Edit field expression Y EDIT ELEMENT EXPRESSION

Field Maintenance Parameters

Keyword Field Position
ID Field ID 1
<> in file 2
<> Copy field ID 3
<> Copy file ID 4

Field-Specific Maintenance Commands

Maintenance Command Description
ADD ELEMENT <field-ID><file-ID><copy-field-ID>
When applied to fields, the standard maintenance function Add offers additional options. A field can be added:  
Field ID field_1 field_1 field_1
in file file_1 file_1 file_1
Copy field ID   * field_2
Copy file ID      
COPY ELEMENT <field-ID><file-ID><copy-field-ID><copy-file-ID>
When applied to fields, the standard maintenance function Copy offers additional options. A field can be copied:
Field ID field_1 field_1 field_1
in file file_1 file_1 file_1
Copy field ID field_2 field_2  
Copy file ID   file_2 file_2
REDEFINE ELEMENT<field-ID><file-ID> Calls the editor for the function Redefine field.
BROWSE ELEMENT<field-ID><file-ID> Invokes the Modify field function for each field in the field list of a file, starting with the field specified. If no field ID is given, the file is browsed from the first field in the list.
This function is especially useful when applying general changes to all fields in a file starting with the field ID specified.
MOVE ELEMENT<field-ID><file-ID> <copy-field-ID>
This command is used to change the order of fields in a file. A field can be moved:
Field ID field_1 field_1
in file file_1 file_1
Copy field ID * field_2
Copy file ID    
EDIT ELEMENT EXPRESSION<field-ID><file-ID>
Calls function Edit field expression. Applicable only to fields of type DV in files of the following types:
B Adabas SQL views
E DB2 view
YV Sybase view

Field Retrieval

The Field Retrieval Menu is called with RETRIEVE ELEMENT.

Overview of Field Retrieval Functions and Commands

Retrieval Type Code Default Output Mode Command
Fields D D DISPLAY ELEMENT
L LIST ELEMENT
S SELECT ELEMENT
D SHOW ELEMENT
Executive retrieval models E T EXECMODEL ELEMENT
T MODEL=IM
IMPLODE ELEMENT
This command will be dropped in a future version.
X MODEL=XR
XREF ELEMENT This command will be dropped in a future version.
Non-standard fields N L NONSTANDARD ELEMENT
Fields and related views R L RELATED ELEMENT
Fields with parent B D PARENTS FIELDS <passive-association-type>
Fields with no parent O L FREE FIELDS | ANY | ALL | <passive-association-type>
Fields with children T D CHILDREN ELEMENT <active-association-type>
Fields with no children U L EMPTY ELEMENT | ANY | ALL | <active-association-type>
Fields related to a Z-file Z L STANDARD ELEMENT

Field Retrieval Parameters

Keyword Field Position
ID Field ID/Synonym 1
FILE in file 2
RES Restrictions 3
OUT Output options 4
LANGUAGE Synonym of language 5
TYPE in files of type 6
MODEL Model 7
MODE Output mode 8

Field-Specific Retrieval Commands

See also Standard Retrieval Commands.

Retrieval Command Description
NONSTANDARD ELEMENT Lists all fields which have not been pulled forward from a standard file or have been marked subsequently as non-standard. If both a field name and file name are entered without an asterisk, the field name is ignored and all fields of the specified file which satisfy the other criteria are listed.
RELATED ELEMENT Lists fields in a userview together with the fields in the master file(s) of the userview from which they are derived. If both a field name and file name are entered without an asterisk, the field name is ignored and all fields of the specified file which satisfy the other criteria are listed.
STANDARD ELEMENT Lists the fields of standard files with their related fields in other files. If both a field name and file name are entered without an asterisk, the field name is ignored and all fields of the specified file which satisfy the other criteria are listed.

Field Active Retrieval

The Field Active Retrieval Menu is called with ACTIVE ELEMENT.

Overview of Field Active Retrieval Functions and Commands

Retrieval Type Code Default Output Mode Command
Fields     see Field Retrieval
Fields ref. by members R L REFERENCED ELEMENT
C COUNT ELEMENT
Fields inconsistently used U L UNUSED ELEMENT
Fields not documented O L UNDEFINED ELEMENT

Field Active Retrieval Parameters

Keyword Field Position
ID Field ID/Synonym 1
FILE in file 2
RES Restrictions 3
OUT Output options 4
LANGUAGE Synonym language 5
USE Usage 6
MASTER For master fields 7
SET Save set 8
MODE Output mode not applicable

Field-Specific Active Retrieval Commands

Active Retrieval Command Description
REFERENCED ELEMENT Lists for every referenced field all members using the field.
COUNT ELEMENT Shows for every referenced field a summary list which indicates for each library and each field usage (for example read or update) the number of members that use the field.
UNUSED ELEMENT Lists fields that are not used by any member or which may be used incorrectly. If parameter Usage is specified, only fields not used in the specified manner are shown.
UNDEFINED ELEMENT Lists fields in implemented files that are not documented in Predict.

Field-specific Special Functions

Function Description
DUPL-LIST ELEMENT <file-ID> Executes the function List duplicate standard fields. This function lists standard fields with duplicate IDs.
DUPL-SEL ELEMENT <file-ID> Executes the function Select duplicate standard fields. This function selects standard fields with duplicate IDs.
SHIFT ELEMENT <file 1> <field 1> <file 2>
Executes the function Move field to other standard file. This function assigns a standard field to another standard file. The field specified with parameter From field ID is deleted and added as To field ID. All references to the old standard field are transferred to the new standard field.
- From File ID 1
- From Field ID 2
- To File ID 3
REASSIGN ELEMENT
Executes the function Reassign standard relationships. References to a standard field are merged with references to another standard field either in the same or in a different standard file.
From File ID file1 file1 file1
From Field ID field1 field1 field1
To File ID file1 file2 file2
To Field ID field2 field1 field2