Creating corresponding templates from selected copybooks

You can create multiple templates from a PDS of copybooks by using the Template Build Utility. The utility builds one template from each selected copybook. The template name is derived from the input member name and any output member mask that you have specified. If you do not supply a template member mask, then the template name is the same as the copybook name.

You can run the Template Build Utility in batch or foreground.

To create multiple templates from a PDS of copybooks:

  1. Navigate to the Template Build Utility panel by:
    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 3. Build from the Copybook and Template Utility functions panel to display the Template Build Utility panel.
  2. In the Copybook Data set name field, specify the data set name of the copybook PDS(E). The name you specify must be a PDS(E), except for vendor-managed library systems such as Panvalet, CA/Librarian, and so on.
  3. In the Copybook Member field, specify the name of a partitioned data set member that contains a copybook.

    If you leave the Member field blank, or specify a member name pattern, Z Data Tools displays a member name list. You can then select the required member by entering S in the Sel field for the appropriate member.

    If you select Advanced member selection, then this name constitutes the first name on the member range panel.

  4. In the Template Data set name field, specify the PDS or PDSE that identifies where the templates are to be stored.
  5. In the Template Member mask field, optionally specify a pattern to rename members in the output partitioned data set based on the member names in the input partitioned data set.
    Note: The Member mask works in the same way as the mask you can use when copying data sets. For an explanation of how you can specify a member name mask in the form of a member name pattern, see Renaming members as you copy.
  6. To run the Template Build Utility in batch, select the Batch execution processing option.

    Batch processing produces up to two reports: the Data Set List report (only produced if a concatenated data set is used for input), and the Template Build Report. Examples of each report are shown below.

    Figure 1. Data set list report
    Data set name                                  Lib
    ---------------------------------------------------
    HFMUSER.COBOL2                                   1
    HFMUSER.COBOL                                    2
    Figure 2. Template Build report
              Template Build Report
    Copybook   Lib Template    Status
    ---------------------------------------------------------------------------
    DITTST1      1 DITTST1     Replaced
    DITTST3      1 DITTST3     Replaced
    DITTST7      1 DITTST7     Compile error
    XYZTST1      2 XYZTST1     Created
    
    4 members read : Template : 1 Created  2 Replaced  1 Errors
    Note: The Lib column is only displayed when more than one input data set is found.
  7. To replace templates that exist with the same name, select the Replace existing templates processing option.
  8. To specify a range of members to be selected, rather than a specific or generic member name, select the Advanced member selection processing option.
  9. To run without showing the member selection list, select the Skip member list processing option. This option is ignored if errors are found (such as duplicate member names due to the rename mask).

Related topics