Selection criteria options


The following figure enables you to control record selection based on starting record key, RBA, or RRN or record counts which determine how selection processing is executed and when it stops. File-AID/Data Solutions determines whether an individual parameter is valid based on the access method of the processed data set.

Enter option 0 on the Change Criteria Menu to display the Selection Criteria Options screen. Selection criteria options can be combined with formatted change and selection criteria. Selection options are processed first. The formatted selection criteria and change criteria are applied after a record passes the selection criteria options selection process.

Selection Criteria Options Screen

 File-AID/Data Solutions ----  Selection Criteria Options  ---------------------
COMMAND ===>

Specify Selection Criteria Options:
                                          Start at the following record key
                                          (both blank for start of dataset)
  Starting record key         ===>
     - OR -                               OR at the following RBA or RRN
  Starting RBA or RRN         ===>

  Initial records to skip     ===> 0      then skip this many records  

  Subsequent Selection Interval:          then repeat the following
    Records to select         ===> 1      - select this many records
    Records to skip           ===> 0      - then skip this many records
                                          until
  Number of records to search ===> ALL    you have read this many records
  Number of records to select ===> ALL    or selected this many records  



  Use END key to return to the criteria menuxvn

Field Descriptions

Specify Selection Criteria Options:

The Starting record key field and Starting RBA or RNN field are exclusive of each other.

Starting record key

Specify a generic or specific record key in a character or hexadecimal data format. This field allows you to specify a random starting point for record selection in a VSAM KSDS, or keyed BDAM file. Records before the starting record key are not selected, regardless of matching formatted selection criteria.

To specify a hexadecimal record key, enter the value enclosed in single quotation marks ( ’ ) and precede the quoted value with the letter X. For example, X’03E2’.

Starting RBA or RRN

Specify a generic or specific relative byte address (RBA) or relative record number (RRN).

This field allows you to specify a random starting point for record selection in a VSAM or BDAM dataset. Records before the specified starting RBA or RRN are not selected, regardless of matching formatted or unformatted selection criteria.

For VSAM KSDS and VSAM ESDS data sets, enter a specific relative byte address. RBAs must be on a record boundary. To specify a hexadecimal RBA, enter the value enclosed in single quotation marks ( ’ ) and precede the quoted value with the letter X.

For VSAM RRDS or BDAM data sets, a relative record number (RRN) can be specified.

Initial records to skip

Specify a number of records for Data Solutions to skip before processing the data set. Possible values are any number from 0 (zero) through 999999. Use the 0 (zero) value to process all records.

Subsequent Selection Interval:

The values in the Records to select and Records to skip fields determine the record selection pattern that Data Solutions uses to select records from a data set until the value in the Number of records to search or the Number of records to select field is reached.

Records to select

Specify the number of records for Data Solutions to retrieve from the data set at a time. Possible values are any number from 1 (one) through 999999. Selection criteria is applied after the record has been retrieved. The default is 1 (one).

Records to skip

Specify the number of records for Data Solutions to skip after fulfilling the Records to select parameter when processing the data set. Possible values are any number from 0 (zero) through 999999. Use the 0 (zero) value for File-AID to process all remaining records. All skipped records are not selected, regardless of the selection criteria specified.

Number of records to search

Specify a limit for the number of records File-AID/Data Solutions reads and checks for matches to selection criteria. The default for this parameter is ALL. Possible values are any number from 0 (zero) through 999999. 0 (zero) or ALL searches the entire file.

Number of records to select

Specify a limit for the total number of records for File-AID/Data Solutions to retrieve from the data set. Possible values are any number from 0 (zero) through 999999. The default is ALL. Use the 0 (zero) or ALL value to retrieve all selected records. A value that exceeds the number of records in the file does not cause an error.

The below figure shows an example of the effect of selection criteria options.

Selection Criteria Options Example

Initial records to skip     ===> 4       then skip this many records  
Subsequent Selection Interval:           then repeat the following
  Records to select         ===> 2       - select this many records
  Records to skip           ===> 3       - then skip this many records
                                         until
Number of records to search ===> ALL     you have read this many records
Number of records to select ===> 10      or selected this many records  


Selected/Not Selected        Records in the file
        NS                    Record      1
        NS                                2
        NS                                3
        NS                                4
        S                     Select 2    5 <=== Starting Record Number
        S                                 6
        NS                    Skip 3      7
        NS                                8
        NS                                9
        S                     Select 2    10
        S                                 11
        NS                    Skip 3      12
        NS                                13
        NS                                14
        S                     Select 2    15
        S                                 16
        NS                    Skip 3      17
        NS                                18
        NS                                19
        S                     Select 2    20
        S                                 21
        NS                    Skip 3      22
        NS                                23
        NS                                24
        S                     Select 2    25
        S                                 26 <=== 10th Record Selected
        NS                                27
        NS                                28
        NS                                29
        NS           Not Selected         30
        NS           Because Limit        31
        NS         Has Been Reached       32
        NS                                33
        NS                                34
        NS                                35

When the values shown in the below figure are entered in the selection criteria options fields, all records in the file pass this portion of the selection process and are processed by any specified formatted selection criteria.

Selection Criteria Options Example. Default - Examines All Records

 Initial records to skip     ===> 0      then skip this many records  

   Subsequent Selection Interval           then repeat the following
     Records to select         ===> 1       - select this many records
     Records to skip           ===> 0       - then skip this many records
                                           until
   Number of records to search ===> all    you have read this many records
   Number of records to select ===> all    or selected this many records

 

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