Templates

FM/IMS uses templates to format database segments into their individual fields. One template is required for each database.

Templates are used by the Edit, Browse, Extract, Print, Batch Edit, and Batch Browse functions.

Static templates

Static templates are created from COBOL copybooks or PL/I include members that define the fields of the database segments. They must be created manually and kept up to date.

Use the Template function (option 4.1), to create individual static templates from scratch or to update individual static templates. The function runs in the foreground.

Use the Template Update Utility (option 4.4), to update one or more static templates in either foreground or batch.

Use the TPLLIBn parameters on the FMN1POPI macro statement to specify the names of the data sets that contain the static templates that you want the above functions to use. If you do not want users to override the values you specify for these parameters, set UTPLLIB=N on the FMN1POPI macro statement.

Note: Static templates are simply called templates in the File Manager for z/OS User’s Guide and Reference for IMS Data.

Dynamic templates

Installations that have added application-defined fields to their DBDs have the option of using dynamic templates. Dynamic templates are templates that FM/IMS dynamically generates from the field definitions in the DBDs.

FM/IMS gets the field definitions from the IMS catalog when ACBs are managed by IMS, or from the DBD libraries for the subsystem when ACBs are managed by your installation. The advantage of dynamic templates over static templates is that they don’t have to be created manually nor do they have to be kept up to date.

To enable dynamic generation of templates, set DYNTPLT=Y on the FMN1POPI macro statement. When dynamic generation of templates is enabled, functions that have requested a new or an existing view or criteria set attempt to generate a template for the database that the function is accessing. If the function is unable to generate a dynamic template for the database, it reverts to using the static template.

The Edit, Browse, Print, Batch Edit, and Batch Browse functions use new and existing views. The Extract function uses new and existing criteria sets.