XML templates

A Z Data Tools template can be exported to an external XML format using the Template Export utility. An XML form of the template can be imported into the product using the Template Import utility. The import process can either create or update an existing template using the template definition in its XML format.

You can use an XML version of the template anywhere you can specify a copybook or template.

To use the foreground utility to export a Z Data Tools template, select one of these options:

With the foreground Template Export utility, you can display a member list with all types of templates supported. You can also invoke a template edit against any type of template using the E prefix command from the member list.

The batch utility for exporting a Z Data Tools template is TPEXP.

To use the foreground utility to import a Z Data Tools template, select one of these options:

The batch utility for importing a Z Data Tools template is TPIMP.

Note:
  • To import a Db2® template you must be running the import utility from a ZDT/Db2 session, whether foreground or batch. The Db2 object referred to in the template XML must exist in the current subsystem for the ZDT/Db2 session.
  • To import an IMS™ template, view or criteria set you must be running the import utility from a ZDT/IMS session, whether foreground or batch.
  • You can export any type of template from any type of Z Data Tools session. The export utility is available from all template menus for convenience.

All aspects of a template can be represented in an XML form. The XML can be created manually by specifying the elements and attributes described in XML definitions for a template, or by exporting an existing template. An XML template can be used directly within the product as long as the XML provides all the elements required to create a new template. A good way to determine the XML required to create a template is to use the Template Export Utility to export a similarly defined template.