So far, you have created a default segment layout for each of the segment types DEMOHDRS and DEMOELES. You can create additional segment layouts for these segment types and specify the conditions under which those layouts should be used. These other layouts are referred to as conditional segment layouts. You can define one or more conditional segment layouts for a single segment type.
The demo Data Division has only one layout that is suitable for formatting data for DEMOELES segment occurrences. For the purposes of demonstrating conditional segment layouts only, you use this layout again to create a conditional layout for DEMOELES.
The Segment Layout Editor window now includes the new conditional segment layout for DEMOELES in the right pane.
As this is not a default layout, the name of the layout is appended by the name of the layout in the COBOL source file. The segment type in the IMS database and the COBOL source layout share the same name which is DEMOELES. Therefore, the new conditional segment layout is named DEMOELES-DEMOELES.
A test field determines which DEMOELES segment occurrences use the conditional layout rather than the default layout. In this case, you define a condition for the 03 FILLER PIC X(133) field.
Whatever you type in here is used by the IMS Database Editor when deciding which segment layouts to apply to which segment occurrences.
If you had selected a condition that required two values, you would also type in a second value into the box on the far right.
In the right pane, the Segment Layout Editor window displays next to the test field.
This concludes the tutorial.