Working with Templates and Views

When browsing or editing a database in FM/IMS, you can use a view to format segments into their individual fields, and to select the segments and fields you want to display. To create a view, you first need to create a template from the copybooks that define the layouts of the database segments.

A template contains the basic description of the segments in a database and the layout of fields in each segment, that is, the field type, size and position within the segment. Because there can be more than one layout for a segment type in a database, you can define layout identification criteria within the template, to enable you to distinguish between the different layouts. Before you can specify layout identification criteria, you need to examine your data, and determine what field values uniquely identify a segment occurrence as belonging to a particular type. Once defined, you can use these segment layouts in your views. Usually, you have only one template defined for each database.

Views are created from a template and contain additional information, such as segment selection, and field selection and display order. It is likely that you will create many views of your databases, each tailored to a specific purpose.