Segment selection criteria


Segment selection criteria are used to control selection of database segments based on occurrence counts and limits rather than field values. Segment criteria are applied to all criteria sets.

If a segment occurrence passes segment selection criteria, field criteria are applied if any exist (see Field Criteria). If a segment occurrence passes all selection criteria, then the relationship criteria that control selection of related database records are applied.

The informational screen shown in the following figure is displayed if you specify new user and select Option 1, Segment, on the Selection Criteria - Menu screen.

Selection Criteria - Segment List Information Screen

File-AID for IMS  -----  Segment Criteria - Segment List Information  ---------
COMMAND ===>


   SEGMENT CRITERIA allow you to control the selection of data base
   segments based on occurrence counts and limits, rather than field
   values.  

   If a segment occurrence passes segment criteria, then field criteria
   are applied, followed by relationship criteria, if any exist.  





  Press ENTER to continue to the next screen  

Segment Criteria Segment List

The Segment Criteria - Segment List screen is displayed as shown in the following figure, when you select Option 1 on the Selection Criteria - Menu screen or enter the SEGMENT command on any screen within Option 6. The Segment Criteria - Segment List screen is a scrollable list of your whole DBD structure. This screen is used to select a segment where segment criteria are to be applied.

Segment Criteria - Segment List Screen

File-AID for IMS  --------  Segment Criteria - Segment List    ROW 1 TO 5 OF 5
COMMAND ===>                                                   SCROLL ===> CSR

Maximum data base segments to extract ===> 0           (0 = No limit)  

Enter S to select a segment  

        Line  Extract
        Cmd   Segment  -----Level-----  Segment-  --Description--
         _       Y     1 DBD-PORDR      ORDR010   ORDER ROOT
         _       Y      2               ORDR020   ORDER LINE
         _       Y       3              ORDR030   ORDER STATUS
         _       Y      2               ORDR040   ORDER SCRAP
         _       Y      2               ORDR050   ORDR-CUST LCHLD
                   ***  END OF SEGMENT LIST  *** 

Maximum Data Base Segments to Extract

Enter the maximum number of database segments to be selected before terminating the selection process. After the specified limit is reached, all remaining segments in the database are not selected regardless of the field selection criteria specified. If this limit is reached while extracting logically related segments, application related segments, or subordinate segments for the root, the extract process continues until all the necessary segments are extracted. If you do not want to set a limit on the number of database segments to select, enter 0 in this field.

Line Cmd

Enter the S line command to select a database segment for processing. Only one database segment at a time can be selected for processing.

Extract Segment

Enter Y if you want to extract a segment. Only the segments that you select are extracted in the selection process. There can be a conflict if you specify a value different than the value specified on the Field Criteria - Segment List screen. See here for more information on specifying Extract Segment values in field and segment criteria.

Level

Displays the hierarchical level number of the segment in the database. For the root segment, the primary DBD name is displayed next to the level number.

Segment

Displays the segment name as specified in the DBD.

Description

Displays a 15-character segment description. This description is stored in the segment/layout cross-reference created in Option 7.

Terminating the Screen

Do one of the following to terminate the Selection Criteria - Segment List screen:

  • Enter an S line command and press ENTER to proceed to the Segment Criteria screen.
  • Enter the FIELD or REL command to access the corresponding Field Criteria Set List (here) or Relationship Specification (here) screen.
  • Enter the END command to terminate the selection process and return to the Selection Criteria - Menu screen.
  • Enter the CANCEL command to terminate the selection process and return to the Selection Criteria - Dataset Specification screen.
  • Enter the RETURN command to return to the Primary Option Menu.

Segment Criteria Screen

The Segment Criteria screen is displayed when you select a database segment on the Segment Criteria - Segment List screen and press ENTER. This screen is used to create segment criteria for any segment in the primary database. The segment criteria data apply to all criteria sets.

Segment Criteria Screen

File-AID for IMS  -----------  Segment Criteria  ------------------------------
COMMAND ===>

         Segment name: ORDR010
Current segment level: 1
      Extract segment: Y  


Starting occurrence number within parent ===> 1          (Must be > 0)
            Selection interval:
                    Select within parent ===> 1          (Must be > 0)
                    Skip within parent   ===> 0  

          Maximum segments within parent ===> 0          (0 = No limit)
Maximum segments within data base record ===> 0          (0 = No limit)
 Max segments to select within data base ===> 0          (0 = No limit)

Starting Occurrence Number within Parent

Enter the database segment occurrence where you want the selection process to begin. All segments prior to the starting database segment occurrence number are not selected, regardless of field selection criteria specified.

Selection Interval: Select within Parent

Enter the number of database segments you want selected at each selection interval. You must specify a value greater than 0 for this field. The Selection Interval: Select and Skip fields determine the segment selection pattern for the database.

Selection Interval: Skip within Parent

Enter the number of database segments you want to skip between selection intervals. All database segments skipped are not selected regardless of field selection criteria specified.

Important

The values specified in the Starting Occurrence Number within Parent and Selection Interval fields can cause File-AID for IMS to not select segment criteria that pass field selection criteria when direct access processing is performed (For more information, see Direct Access Processing.).

Maximum Segments within Parent

Enter the maximum number of segments to be processed within a parent. If you do not want to set a limit on the number of segments to select within a parent, enter 0 in this field.

Maximum Segments within Data Base Record

Enter the maximum number of segments to be processed within the current root segment before terminating the selection process. After this limit is reached, all remaining segments are not selected regardless of the field criteria specified. If you do not want to set a limit on the number of segments to select, enter 0 in this field.

Max Segments to Select within Data Base

Enter the maximum number of segments of the specified segment type to select during the selection process. This field enables you to set an absolute limit on the number of occurrences of the specified segment type that are processed. After this limit is reached, all remaining segments of the specified segment type in the database are not selected regardless of the field criteria specified. If you do not want to set a limit on the number of database segments of the specified segment type to select, enter 0 in this field.

Terminating the Screen

Do one of the following to terminate the Segment Criteria Screen:

  • Enter the FIELD or REL command to access the corresponding Field Criteria Set List or Relationship Specification Screen.
  • Enter the END command to terminate editing of the selection criteria and return to the Segment Criteria - Segment List screen.
  • Enter the RETURN command to terminate editing and return to the Primary Option Menu. If you are editing existing selection criteria in Option 6, the member is saved before the command is executed.
  • Enter the CANCEL command to terminate editing of the selection criteria. If you are editing existing selection criteria in Option 6, the selection criteria member is not saved and you are returned to the Selection Criteria - Dataset Specification screen. If you are editing temporary selection criteria within the Extract function, CANCEL returns you to the previous screen in that function, and the criteria are not applied.

The following figure is an example of segment selection criteria.

Example of Segment Selection Criteria

                           SEGMENT NAME: ORDR010                                    
                  CURRENT SEGMENT LEVEL: 1                                          
                        EXTRACT SEGMENT: Y                                          
                                                                                   
  STARTING OCCURRENCE NUMBER WITHIN PARENT  —> 3 (Must be > 0)                      
                SELECTION INTERVAL:                                                 
                       SELECT WITHIN PARENT —> 2 (Must be > 0)                      
                       SKIP WITHIN PARENT   —> 1                                    
                                                                                   
             MAXIMUM SEGMENTS WITHIN PARENT   —> 0 (0 = No limit)                   
   MAXIMUM SEGMENTS WITHIN DATA BASE RECORD   —> 0 (0 = No limit)                   
    MAX SEGMENTS TO SELECT WITHIN DATA BASE   —> 5 (0 = No limit)                   
                                                                                   
 
Selected/Not Selected   Segments in the Primary Data Base                 
                                                                         
  NS                      Root Segment      R                                       
  NS                      Child Segment     C                                       
  NS                                        C                                       
  NS                                        R                                       
  S                     Select 2          R  <—Starting Occurrence Number           
  S                                         R                                       
  S                                         C                                       
  NS                      Skip 1            R                                       
  NS                                        C                                       
  NS                                        C                                       
  S                       Select 2          R                                       
  S                                         C                                       
  S                                         R                                       
  S                                         C                                       
  S                                         C                                       
  NS                      Skip 1            R                                       
  NS                                        C                                       
  NS                                        C                                       
  S                     Select 2          R  <—5th Root Segment Selected            
  S                                       C  <—10th Data Base Segment               
                                               Selected*                            
  S                                         C                                       
  S                                         C                                       
  S                                         C                                       
  NS              Not selected because      R                                       
  NS              limit has been reached    C                                       
  NS                                        C                                       
  NS                                        R                                       
  NS                                        R 

* Based on a value of 10 set in the Maximum Data Base Segments to Extract field on the Segment Criteria - Segment List screen.

In this example, no logically related database segments are selected.

If you enter the following values in the segment selection criteria fields for all segments on the Segment Criteria - Segment List screen, all segments in the primary database pass segment selection criteria and proceed to field criteria.

STARTING OCCURRENCE NUMBER WITHIN PARENT  —> 1 (Must be > 0)
               SELECTION INTERVAL:
                    SELECT WITHIN PARENT  —> 1 (Must be > 0)
                    SKIP WITHIN PARENT    —> 0

           MAXIMUM SEGMENTS WITHIN
 PARENT —> 0 (0 = No limit)
 MAXIMUM SEGMENTS WITHIN DATA BASE RECORD —> 0 (0 = No limit)
  MAX SEGMENTS TO SELECT WITHIN DATA BASE —> 0 (0 = No limit)

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*