Creating a template from a model template

You can use the Template Workbench to create copies of an existing copybook or dynamic template. The original template serves as a model, providing template information such as record selection criteria that you can then edit in the new copy.

To create a template from an existing (model) template:

  1. Open the Template Workbench panel by performing either of these actions
      1. Selecting option 7. Templates from the Primary Option Menu panel to display the Copybook and Template Utility functions panel, and then
      2. Selecting option 1. Workbench from the Copybook and Template Utility functions panel to display the Template Workbench panel.
    • Issuing the TVIEW primary command on either the View or the Edit panel. If it is accessed from an editor session, the Template Workbench contains two additional options (RC - Run using copybook and RT Run using template).
  2. In the Data set name field in the Model Template section, type the name of the data set in which your existing template is stored.

    Templates can be stored in PDS or PDSE data sets but not in a CA-Panvalet library, or a library accessed using the Library Management System Exit.

  3. If you know it, type the Member name of the template into the relevant field or specify blanks or a pattern for the member name to have a member selection list displayed. You can then select the required member from the list.
  4. In the Data set name field in the Template section, type the name of an existing data set, into which you want the new template to be saved.

    Templates can be stored in PDS or PDSE data sets but not in a CA-Panvalet library, or a library accessed using the Library Management System Exit.

  5. In the Member field of the Templates section, type the name for your new template.

    If you want to copy the template model to another existing template (which overwrites the existing template), specify an existing member name or specify blanks or a pattern to have a member selection list displayed. You can then select the required member from the list.

  6. On the Command Line, type the CM command and press Enter.

    Z Data Tools generates and saves the template. A message is displayed in the upper right corner of the panel, to indicate the success or failure of the process.

Note: If you do not provide a template data set name, Z Data Tools creates a temporary template, which you can then edit. Before you close the Template Workbench, you can save the template by specifying a template name and entering the SAVE command. Otherwise the template is discarded.

Related topics