Previous Topic: Ordinary LayoutsNext Topic: Use Layout Functions


Custom Record Layouts

A custom record layout lets you create one or more customized views of your file data based on one or more ordinary layouts. A custom record layout member can only be created using the Layout (Option 6) function. Use a custom record layout in place of an ordinary layout almost anywhere that the use of layouts is supported, including the following situations:

You cannot use a custom record in the following situations:

While an ordinary layout provides a single view of your file data based on a single COBOL or PL/I copy member, a custom record layout lets you create as many different views as you like for each file. Each view is based on an ordinary COBOL or PL/I record layout and can be customized to meet your individual needs. When you create a custom record layout with multiple views, you also define the exact data-specific conditions for which each view should be used. You also decide which fields should be included in formatted displays, and which portion of each record should be mapped by your layout.

You can use custom record layouts to accomplish the following tasks:

Custom record layouts must reside in a partitioned data set with 80-byte records. They may coexist with your ordinary COBOL or PL/I record layouts; however, custom record layouts are typically maintained in a separate partitioned data set defined in the CA File Master Plus Parm Files (Option 0.3) screen. When using a custom record layout, the Layout Dataset always refers to the partitioned data set containing your custom record layout definition. The layout member refers to the member name given to the custom record layout when it was created.

Because a custom record layout may contain multiple views, it is common for different records within the same file to be displayed using different field definitions. When each view is defined within the Layout (Option 6) function, you also define the selection conditions for which the view should be used. Selection conditions compare one or more layout fields to other layout fields or to literal values. Before any record is formatted, the selection conditions for each view are evaluated. When the conditions for a view are satisfied, that view is used to format the record data, showing only the fields defined in the custom record layout.