Previous Topic: Example: Simple ConditionNext Topic: Field-Level Inclusion and Exclusion


Example: Complex Condition

For complex conditions involving more than one field, fill in the same condition columns for each of the fields, then join the conditions by typing AND or OR in the A/O column.

If you press Enter without specifying an operator in the A/O column, the utility generates an AND operator where required.

Example:

  1. Type EQ in the OP column next to CUST-ACCT-OPENED-YY and 99 in the compare value column.
  2. Type EQ in the OP column next to CUST-ACCT-OPENED-MM and 12 in the compare value column.
  3. Type AND in the A/O column next to CUST-ACCT-OPENED-MM.

    You have created the following selection condition:

    IF CUST-ACCT-OPENED-YY EQ 99 and CUST-ACCT-OPENED-MM EQ 12
    

A complex selection condition is rare, but you may type as many conditions as necessary to meet your needs. You may also type as many literal values as you like for a single field.

Example:

  1. Type NE in the OP column next to CUST-STATE.
  2. Type C'NY' C'NJ' C'CT' C'MA' C'RI' in the compare value column.

    You have created the following selection condition:

    IF CUST-STATE EQ  'NY' or 'NJ' or 'CT' or 'MA' or 'RI'
    

If none of the selection conditions defined for any of your views is met for any file record, the default view will be used for formatting. If no default view has been established, the data will be formatted as a single character field.