Editing a template

You can perform template editing:
  • From any panel that has the Edit template option.
  • From the Template workbench.
  • By using the appropriate template primary commands from an editor session.

    Template commands from within an editor session may be restricted in function, depending on the type of Edit or View being performed.

  • By using the E command from the template update utility member list (option 7.4).
There are two ways to perform a template edit:
  • You can select the Create dynamic option.
  • On panels with the Edit template and Type options, you can set those options.

    These options are ignored for dynamic templates. If you specify Create dynamic or edit an existing dynamic template, File Manager always displays the Dynamic Template panel.

Figure 1. Editing a template: task flow
Flowchart showing task flow when editing a template
Source definition:
  • Type "S" specified and Edit template option selected, or
  • CC or U command entered on Template Workbench panel with:
    • Advanced copybook selection option selected, or
  • E command entered on Template Workbench panel with:
    • Copybook data set name specified, and
    • No template data set name specified, and
    • Advanced copybook selection option selected
Criteria edit or dynamic edit:
  • Type "1" or "2" specified and Edit template option selected, or
  • Template is a dynamic template, or
  • CE or DE command entered during an editor session

To edit a template from a supported panel:

  1. In the Copybook or Template section, specify the data set name of a copybook or template.

    Templates can be stored in sequential (PS), PDS or PDSE data sets. CA-Panvalet libraries can only be used as input data sets for copybooks.

  2. In the same section, specify the Member name or leave the Member name field blank to choose from the list of data set members.
  3. Set the Copybook/template flag to Above or Create dynamic.
  4. If you did not select Create dynamic, select Edit template using one of the following options:
    /
    Edit the specified template. F3 will return to the entry panel and clear this option.
    A
    Always edit the specified template. When the template edit session is completed, F3 will invoke the current function. F12 will cancel the template edit session and return to the entry panel.
    R
    Edit the template and use the RUNTEMP command (F6) to invoke the current function. Exiting the function will re-edit the template, allowing you to save the template or re-invoke the edit or view session using RUNTEMP.
    Set Type to determine the point at which you want to perform template editing:
    Blank
    Normal record type or field/selection edit for single layout copybooks or templates.
    S
    To edit the source definition using the advanced copybook selection process.
    1
    To perform criteria edit by field for identification criteria before the field/selection edit. This provides a fast path when you just want to specify criteria by field.
    2
    To perform criteria edit by field for selection criteria before the field/selection edit. This provides a fast path when you just want to specify criteria by field.
  5. Make the required editing changes and do one of the following:
    • When you are creating a new template, pressing the Exit function key (F3) displays the Template Save pop-up panel.
    • Type SAVE on the Command line and press Enter. You can then choose to make further changes, continue to the next relevant panel or return to your entry panel.
    • Type SAVEAS on the Command line and press Enter. Specify the data set (and member name if a PDS) of the new template and press the Exit function key (F3). You can then choose to make further changes, continue to the next relevant panel or return to your entry panel. The new template is used in place of the original for the current function.
    • Press RunTemp function key (F6) to display the next relevant panel using the changes you have made but without saving those changes.
    • Press Cancel function key (F12) to return to your entry panel without saving the changes.

To edit an existing copybook template from an editor panel:

  1. Type one of the following commands on the Command line and press Enter.
    TEdit
    Template Edit: If your copybook has only one record type, the Field Selection/Edit panel is displayed. From here, you can enter 1 or 2 to access the Record Identification Criteria or Record Selection Criteria panels.

    If your copybook has two or more record types, the Record Type Selection panel is displayed. In the Command field adjacent to the record type that you would first like to edit, type an E and press Enter. The Field Selection/Edit panel for that record type is displayed.

    CEdit (or CEdit SEL or DEdit)
    Criteria Edit (Selection): The CE, CE SEL and DE commands are all synonymous in this situation and display the Record Selection Criteria panel, showing the fields in the currently displayed record type. From here, you can enter 1 to access the Field Selection/Edit panel. If your copybook has two or more record types, the Record Type Selection panel displays at this point. In the Command field adjacent to the record type that you would first like to edit, type an E and press Enter. The Field Selection/Edit panel is displayed.
    CE ID
    Criteria Edit (Identification): The Record Identification Criteria panel is displayed. From here, you can enter 1 to access the Field Selection/Edit panel. If your copybook has two or more record types, the Record Type Selection panel is displayed at this point. In the Command field adjacent to the record type that you would like to edit, type an E and press Enter. The Field Selection/Edit panel is displayed.
  2. Make the required editing changes and do one of the following:
    • Press the Exit function key (F3) to save the changes and display the next relevant panel (for example, the View panel). The message "Template saved" appears in the upper right corner of the panel.
      Note: Unlike when creating a new template, the Template Save pop-up panel is not displayed at this point. The previous version of the template is automatically replaced by the changes you have made.
    • Type SAVE on the Command line and press Enter. You can then choose to make further changes, continue to the next relevant panel or return to your entry panel.
    • Type SAVEAS on the Command line and press Enter. Specify the data set (and member name if a PDS) of the new template and press the Exit function key (F3). You can then choose to make further changes, continue to the next relevant panel or return to your entry panel. The new template is used in place of the original for the current function.
    • Press RunTemp function key (F6) to display the next relevant panel using the changes you have made but without saving those changes.
    • Press Cancel function key (F12) to return to your entry panel without saving the changes.

To edit an existing dynamic template from an editor panel:

  1. Type one of the following commands on the Command line and press Enter.
    TE
    Template Edit: The Field Selection/Edit panel is displayed. However, you cannot change the Field Name, Start, Length or Type fields from this panel, nor can you change the record selection criteria. To perform these tasks, enter 1 to display the Dynamic Template panel.
    DE (or CE, CE SEL or CE ID)
    Dynamic Edit: The CE, CE SEL and DE commands are all synonymous in this situation and display the Dynamic Template panel.
  2. Make the required editing changes and do one of the following:
    • Press the Exit function key (F3) to save the changes and display the next relevant panel (for example, the View panel). The message "Template saved" appears in the upper right corner of the panel.
      Note: Unlike when creating a new template, the Template Save pop-up panel is not displayed at this point. The previous version of the template is automatically replaced by the changes you have made.
    • Type SAVE on the Command line and press Enter. You can then choose to make further changes, continue to the next relevant panel or return to your entry panel.
    • Type SAVEAS on the Command line and press Enter. Specify the data set (and member name if a PDS) of the new template and press the Exit function key (F3). You can then choose to make further changes, continue to the next relevant panel or return to your entry panel. The new template is used in place of the original for the current function.
    • Press RunTemp function key (F6) to display the next relevant panel using the changes you have made but without saving those changes.
    • Press Cancel function key (F12) to return to your entry panel without saving the changes.

Related topics