Previous Topic: Insert LayoutsNext Topic: Apply a Layout to a Data Set


Create Custom Layout Rules

For each view, you must define rules that define when a specified copybook will be used. For single-record or multi-record formatting mode, each record is evaluated according to the defined rules to determine which layout will be used.

The rules are evaluated in the order that the copybooks are defined to the custom record layout. When the conditions for a copybook are satisfied, that layout is used to format the record data, showing only the fields defined in the custom record layout. If no conditions are met, the default copybook is applied.

You can create rules that compare fields against either a literal value or other fields. You can also use rules to define which fields to display when a copybook is applied.

After you add a copybook to a custom layout and press Enter, the Custom Layout Entry Field Update screen displays. You can also access this screen by entering an S in the action field to the left of one of the existing copybooks in the Custom Record Layout Member Update screen. Use this screen to define the rules that determine when the copybook is applied and which fields to display when using that copybook.

Follow these steps:

  1. Type S in the action field for a copybook field that you want to use for a rule.
  2. Enter one of the following operands in the OP field on that line:
    = or EQ

    Equals

    ^= or NE

    Not equal

    > or GT

    Greater than

    < or LT

    Less than

    >= or GE

    Greater than or equal

    <= or LE

    Less than or equal

    CO

    Contains

  3. Specify the value for the condition in the Compare Value or Field Name field.

    The condition is set to display the records that meet the specified criteria using the displayed copybook.

    You can specify as many conditions as you want for the copybook on the Custom Layout Entry Field Update screen. When specifying more than one condition, type A (and) or O (or) in the A field. The default value is A.

  4. Type X in the action field of the copybook field name to prevent that field from displaying. You can omit as many fields as you want.
  5. Repeat this procedure for all copybooks in the custom layout. If a copybook does not have any conditions specified, the copybook with not be used in the custom layout.

    Note: Records that do not meet any of the conditions specified for any of the copybooks in the custom layout are displayed using the default copybook.