DEFINE TEMPLATE statement
The DEFINE TEMPLATE
statement refines the update definition to include
only specified fields and to change the order of these fields in the output file.
Syntax
Parameters
DEFINE TEMPLATE template_name
- Specifies the name of the template. The name of the template definition must be the same as the
update definition that it is associated with. The custom template definition replaces the default
template definition that is created by the update definition.Important: The
DEFINE TEMPLATE
statements must be included after theDEFINE UPDATE
statement in the input stream because the field names are verified based on the fields in the update definition. FOR update_name
- Specifies the name of the update definition that this template augments.
ORDER (field_name,...)
- Specifies the order of fields for this template. One field_name entry
represents a field that is required for this template.
field_name
- Specifies the name of the field. The field names must be unique in a template, and they must be
names that are already defined in the update definition that this template is augmenting. Important: Do not specify repeated field names.
AS &IBM_FILE_FORMAT
- This parameter must be included as shown in the syntax.
Example
The following example shows a simple DEFINE TEMPLATE
statement.
DEFINE TEMPLATE SMF_030_CUST FOR SMF_030_CUST
ORDER
(SMF30JBN,
SMF30PGM,
SMF30STM,
SMF30UIF)
AS &IBM_FILE_FORMAT;