Creating a copybook template with the Template Workbench

To create a copybook template with the Template Workbench:

  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 Copybook section, type the name of the data set in which your copybook is stored.

    Copybooks can be stored in PDS, PDSE or CA-Panvalet libraries. Library members may not be packed by ISPF.

  3. If you know it, type the Member name of the copybook 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 copybook to an existing template (which overwrites the existing template), specify an existing member name or specify blanks or a pattern to display the Member Selection panel. You can then select the required member from the list.

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

    Z Data Tools validates the copybook by compiling it with your default compiler and, if successful, 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