What is a template?

A File Manager/Db2 template is a collection of information that you can use to select and format tables and columns in a Db2® object. If you use a File Manager/Db2 function that interfaces with non-Db2 data, the corresponding template describes the records and fields in the data set.

When you associate a template with data, you can:
Manipulate columns
You can select which columns you want to work with, adjust the order in which they are shown, and modify the column headings.

You can select to show leading zeros for numeric columns. (By default, leading zeros for numeric columns are suppressed. For example, 00057 is displayed as 57.)

Map data
If you are copying, importing, exporting, or loading data, you can map how data is transferred from the source to the destination.
Select rows
You can specify row selection criteria to restrict the data to the rows you want to work with.
Create data
If you are creating a new table, or adding new columns when moving data, you can specify create attributes that FM/Db2 uses to initialize column values.
If you use a File Manager/Db2 function that uses a template for a Db2® object, you can select one of the following options:
  • Specify the name of an existing template
  • Use FM/Db2 to generate a template (using information from the Db2® catalog for the Db2® object)
  • Use the template that was last used with the Db2® object
  • Use FM/Db2 to generate a template and immediately save the template using a name you specify

Related tasks