Rational Developer for System z, Version 7.6

Types of templates

The Template Editor is capable of working with several different types of templates. Each template shares certain core characteristics with one another but also offers different functionality. Because of these differences, the Template Editor offers different levels of editing functionality for all templates. This topic discusses each type of template and the differences between them.

The Template Editor examines the type of template being used and adjusts to display only the options available for the template type you are working with. This dynamic interface helps simplify the editing process by allowing you to see and work with only the items that are important. Editing options that are not pertinent to your template type are either removed from the display all together or grayed out to indicate they are disabled. If your preference of template type changes, the editor dynamically updates itself to match the options available for the new template type.

Copybook templates

A copybook template has field definitions that are derived from one or more COBOL copybooks or PL/I INCLUDE files. In addition to field definitions, these source files also describe the members, their corresponding data sets, and also how the field definitions are to be arranged in the template. There are two different types of copybook templates that can be created.

The simplest form is a template generated from a single COBOL copybook or PL/I INCLUDE. The Template editor identifies this type as a simple copybook template.

The second type of copybook template that can be generated is a template derived from one or more COBOL copybooks or PL/I INCLUDE files. This type is identified as an advanced copybook template. This form of copybook template describes one or more copybook members, inserted level-01 data items, the template type and structure, the range of statements to be included, and how REDEFINES or UNION clauses are to be interpreted in terms of record layouts.

A copybook template combines the layout information provided by the source files with additional information supplied by you. When creating and editing templates, you provide data pertaining to formatting, record selection, and data creation, to produce a logical view of the data when the template is applied in the Formatted Data Editor.

In copybook templates, field definitions are not editable like they are with dynamic templates. However, copybook templates allow criteria editing by-field or through freeform REXX™ expression to help increase the effectiveness of the template.

Segmented copybook template

The Template Editor offers template support for segmented records. A segmented record is a record that contains one or more logical segments, each of which is defined and identified by a copybook layout. When you apply a segmented copybook template to a data set that features segmented data, each segment is treated as a logical record within the supported functions. Any copybook template that contains more than one record layout can be set to be used with segmented data. The option to enable use with segmented data is available when the template is opened in the Template Editor. Segmented copybook templates have all the same functionality of a regular copybook template. In addition, they also allow you to define related record identification criteria and whether a field of less than 4 bytes is to be considered a length field as well as whether the value of the field is inclusive or exclusive.

Dynamic template

A dynamic template is a File Manager template that is constructed without the use of any source code to help derive the record layout. Dynamic templates contain customized field definitions with the following properties that can be edited: field name, starting position of the field, length of the field, and field type. Unlike copybook templates, the field definitions within dynamic templates can be created, deleted, modified, and reordered at any time using the Template Editor. Dynamic templates are particularly useful when working with data sets that do not have an appropriate copybook.

When creating a dynamic template, only one record layout can be included in the template. Because of this limitation, dynamic templates cannot be used for segmented data. Record selection and record identification criteria can be created and edited within dynamic templates, but can only be done using the by-field Build Criteria editor. Support for freeform criteria editing with dynamic templates is not offered.

Dynamic templates can also be based on existing layouts found in existing templates.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)