Field Retrieval

Field retrieval functions are called from the Field Retrieval menu, which is called with the command RETRIEVE ELEMENT or with Code R and object type code EL in a Predict Main Menu.

This document covers the following topics:

Standard retrieval types are described in the section Retrieval in the Predict Reference documentation.


Field-Specific Retrieval Parameters

See also Selection Criteria and Output Options in the section Retrieval in the Predict Reference documentation.

Parameters for Selection
Field ID/Synonym When retrieving information on fields, the identifiers of fields and language-specific synonyms can be used as selection criteria.
Synonym of language
Determines how Field ID/Synonym is used to select fields:
none Field ID/Synonym applies to field IDs.
# All: Field ID/Synonym applies to field IDs and to field name synonyms for all languages.
language If any language is specified, Field ID/Synonym applies to field IDs and to field name synonyms of this language.
Belongs to FI ID of the file to which a field object belongs.
Files of type

Only fields contained in files of the specified type will be included in the selection.

The value specified is stored in the global variables applying only to fields.

See also Specifying Parameter Values in the section Predict User Interface in the Introduction to Predict documentation.

Field-Specific Output Options
3GL specification
Y The following 3GL-specific attributes of fields are displayed:
Gr.structur, Justify, Synchronized, Init. value, Indexed by, Depending on, Condition name and Condition value.
Composed fields
Y The source fields of hyper/super/subfields are displayed when fields of these types are displayed.
Display length
The format in which the length of fields is displayed.
N Natural Format
P Physical Format
DV-Field expression
Y Derived field expressions are displayed.
Natural options
Y Up to three headers displayed in Natural maps and the definition of the Natural edit mask are displayed.
Sorted by field
Used to determine how field and file lists are sorted:
N Sort fields alphabetically by file ID. All fields are displayed in the order they are defined in the file.
Y Sort fields alphabetically by field ID.
Note that the sort order also depends on the selection criteria. See Sorting Fields and Files below for more information.
Synonyms Synonyms of field names for specific languages are displayed.
A language can be selected from a selection window.

Sorting Fields and Files

Field and file lists produced by retrieval operations can be sorted by field ID or by file ID.

Sorting by Field ID

If fields and files are sorted by field ID, fields that are used in different files are sorted alphabetically by field.

    13:25:45            *****  P R E D I C T  *****             2007-05-31
                                   - List Field -                      Page:    3
   
    Cnt   Ty L Fieldname                        F    Length D File ID
   
       37 GR 1 A-BINARY-GROUP                                 TSH-C-FILE
       38    1 A-CITY                           A     20.0    * MISCELLANEOUS
       39    1 A-CITY                           A     20.0  D TNG-ADABAS-FILE1
       40    1 A-CITY                           A     20.0    TSH-C-FILE
       41    1 A-DATE                           D             TNG-ADABAS-FILE1
        .       .                               .      .           .
        .       .                               .      .           .
   
   

Field lists will be sorted by field if parameters are specified in one of the following combinations:

Sorted by Field Field ID specified File ID specified
Y    
Y Y  
Y Y Y
N Y  

Note:
If only a field id is specified as selection criteria, field and file lists are sorted by field, even if sorted by field is set to N.

Sorting by File ID

If fields are sorted by file, the fields appear in the order they are defined in the file.

    13:29:12            *****  P R E D I C T  *****             2007-05-31
                                   - List Field -                      Page:    1
   
    Cnt   Ty L Fieldname                        F    Length D File ID
   
        1    1 AA-FIELD                         A     12.0  D * A-ADDR-FILE
        2    1 AB-FIELD                         A      1.0  D * A-ADDR-FILE
        3 MU 1 AC-FIELD                         A     20.0  D * A-ADDR-FILE
        4    1 AD-FIELD                         A     60.0  D * A-ADDR-FILE
        5    1 AE-FIELD                         A     60.0    * A-ADDR-FILE
   

Field lists will be sorted by file if parameters are specified in one of the following combinations:

Sorted by Field Field ID specified File ID specified
N    
N   Y
N Y Y
Y   Y

Note:
If only a file ID is specified as a selection criterion, field and file lists are sorted by file even if sorted by field is set to Y.

Field-specific Retrieval Functions

The following field-specific retrieval functions no longer exist. Alternatives are shown below:

Standard retrieval functions are described in the section Retrieval in the Predict Reference documentation.

Fields and Related Views - Code R

Reports on fields and the related fields in related files. Related file means a master file and its userview. The relationship between fields is established as described below depending on whether the view is derived from a single master file or from several master files.

  • Single-Master Views
    Views and userviews derived from a single master file, for example an Adabas file and its userview, are related by field short name (see Field Short Name ).

  • Multiple-Master Views
    For views which can be derived from several master files (SQL tables and views), the coupling is established by parameters from Table/View ID and from Field ID in the field List of the file documenting the view.

Command: RELATED ELEMENT

See Rippling in the section File for more information on related fields and files.

Non-Standard Fields - Code N

Lists fields which are not derived from standard files, and also fields which were derived from standard files but subsequently changed to non-Standard fields.

Command: NONSTANDARD ELEMENT

Fields Related to a Z-File - Code Z

Reports on fields which are derived from standard files.

Command: STANDARD ELEMENT

Layout of Field Lists

Three different list formats are used for displaying information on fields:

  • when fields are listed without entering a specific file (format 1 below)

  • when fields used in a specific file are listed (format 2 - non SQL file)

  • when fields used in a specific file are listed (format 3 - SQL file)

Format 1

The first list format applies when fields of several files are listed.

    08:58:18             *****  P R E D I C T  *****             2007-05-31
                                   - List Field -                       Page:    1
   
    Cnt   Ty L Field ID                         F    Length D File 
   
        1    1 FH-001                           A     50.0    PD-ADA-LONG
        2    1 FH-002                           A     50.0    PD-ADA-LONG
        3    1 FH-003                           A     50.0    PD-ADA-LONG
   

  
Meaning of Columns
Ty Type of field. See Field Type for a complete list of Field types and codes. RE indicates a redefinition.
L The field level. Level number of the field. See Level Number.
Field ID ID of the field object.
F The field format. See Field Format.
Length The field length. See Field Length.
D Descriptor type. See Descriptor Type.
File ID of the file containing the field.

Format 2

The second list format is used when fields used in a specific non SQL file are listed.

    13:44:34             *****  P R E D I C T  *****              2007-05-31
                                   - List Field -
   
    File ID ............ ARH-A1
    Type ............... Adabas file
    Fnr ................ 12
    -------------------------------------------------------------------------------
    Cnt   Ty L Field ID                         F    Length D U DB S   Occ
   
        1    1 FIELD1                           A      5.0      AA N
        2    1 FIELD2                           A      3.0      AB N
        3    1 FIELD3                           A      4.0      AC N
        4    1 FIELD4                           A      6.0      AD N
        5 RE 1 FIELD4
        6    2 FIELD4-RE1                       A      3.0
        7    2 FIELD4-RE2                       A      3.0
   

Meaning of Columns
U Unique option. U is displayed if the field is a unique descriptor.
DB Field short name. See Field Short Name.
S Suppression / Null Value option. See Suppression / Null Value option.
Occ Number of occurrences for multiple fields. See Maximum Number of Values / Occurrences.

Format 3

The third list format is used when fields used in a specific SQL file are listed.

    13:44:34             *****  P R E D I C T  *****              2007-05-31
                                   - List Field -
   
    File ID ............ HEB-DB2
    Type ............... DB2 table
    Fnr ................ 13
    -------------------------------------------------------------------------------
    Cnt   Ty L Field ID                         F Cs  Length D U DB N Df  Occ
   
        1    1 HEB-EL                           A       5.0      AU U
        2    1 HEB-EL1                          A       3.0    U AA R Y
        3    1 HEB-EL2                          A M     4.0      AC U
        4    1 HEB-EL3                          A       6.0      AD U
        5 RE 1 HEB-EL4
        6    2 HEB-EL-RE                        A       3.0
        7 SP 2 HEB-SUP6                         A            D   AC

Meaning of Columns
Cs Character set.
N Null Value option.
Df Null default option.

Output Options for Fields

Notes:

  1. Unless output mode is S, the option Cover page is always valid.
  2. Page size is only applicable when printing or if general default parameter Use SAG Editor for output is set to Y. Page size is not applicable in batch mode.
  3. With option Mark Implementation the corresponding file ("Belongs to FI") is marked.
  4. If "Descriptors only" is set to Y, only fields with descriptor option not set to ' ', 'N' or 'E' are shown.
Retrieval type D B O T
dummies=Y|N dummies=D|P
Output Mode D L D L D L D L D L
Current/Related c c c r c r c c c r c r c r c r
Association attributes     Y Y Y Y     Y Y Y Y        
Attributes Y   Y       Y   Y       Y      
Composed fields Y   Y       Y   Y       Y      
Connecting Character       Y           Y            
Description Y   Y Y     Y   Y Y     Y      
Descriptors only Y Y Y   Y   Y Y Y   Y   Y   Y  
Display length   Y                            
Display modifier Y   Y       Y   Y       Y      
Dummy/Placeholder                   Y   Y   Y   Y
DV-field expression Y   Y       Y   Y       Y      
Extract       Y           Y       Y    
Keywords Y   Y Y     Y   Y Y     Y      
Mark implementation Y Y Y Y Y Y Y Y Y Y Y Y Y   Y  
No. abstract lines Y Y Y Y Y Y Y Y Y Y Y Y Y   Y  
Natural options Y   Y       Y   Y       Y      
Owner Y   Y Y     Y   Y Y     Y      
With users Y   Y Y     Y   Y Y     Y      
Show implementation                                
Sorted by field Y Y Y   Y   Y Y Y   Y   Y   Y  
Synonyms Y Y Y   Y   Y Y Y   Y   Y   Y  
Use Con-form Y   Y Y     Y   Y Y     Y      
User exit Y   Y       Y   Y       Y      
3GL specification Y   Y       Y   Y       Y      

Output Options for Fields - Continued

Retrieval Type U E N R Z
Output Mode D L T X D L L D L
Current/Related c c c r c r c c c c c
Association attributes     Y Y              
Attributes Y     Y   Y Y     Y  
Composed Fields Y           Y   Y Y  
Connecting character       Y   Y          
Description Y         Y Y     Y  
Descriptors only Y Y Y   Y   Y Y Y Y Y
Display length   Y           Y Y   Y
Display modifier Y           Y     Y  
Dummy/Placeholder                      
DV-Field expression Y           Y     Y  
Extract       Y   Y          
Keywords Y     Y   Y Y     Y  
Mark implementation Y Y Y Y Y Y Y Y Y Y Y
No. abstract lines Y Y   Y   Y Y Y Y Y Y
Natural options Y           Y     Y  
Owner Y     Y   Y Y     Y  
With users Y           Y     Y  
Show implementation                      
Sorted by Field Y Y Y   Y   Y Y Y Y Y
Synonyms Y Y         Y Y Y Y Y
Use Con-form Y         Y Y     Y  
User exit Y           Y     Y  
3GL specification Y           Y     Y