Rational Developer for System z

Setting preferences for COBOL code templates

You can modify, add, or delete COBOL template code and comments.

About this task

You can change a template's existing comment or generated code, add comments or code to a template, use code or comments from an existing XML file, or save one or more features to an XML file. You can restore the product defaults for the templates. You can also enable bidirectional visual editing.

Procedure

To configure generated COBOL code and comments, complete the following steps:

  1. Click Window > Preferences > COBOL > Features > Code Templates. A list of the currently configured COBOL templates for comments and code are displayed. The existing comment templates under Comments are as follows:
    • Copybook Comment
    • Program Comment
    • Data Division Comment
    • Environment Division Comment
    • ID Division Comment
    • Procedure Division Comment
    The existing code templates under Code are as follows:
    • Copybook
    • Program
    • Data Division
    • Environment Division
    • ID Division
    • Procedure Division
  2. Perform one or more of the following tasks:
    Task Steps
    Change a template
    1. Select a name under Comments or Code.
    2. Click the Edit button. An "Edit template" window is displayed.
    3. Edit the template, and click OK.
    4. Click the Apply button.
    Import a template
    1. Click the Import button. An Open window is displayed.
    2. Select an XML file, and click Open.
    Export a template
    1. Click the Export All button, or select one or more features and click the Export button. An "Export COBOL features" window is displayed.
    2. Specify the location and file name of the XML file to be created, and click Save.
    Restore template defaults
    1. Click the Restore Defaults button. An "Confirm Restore Defaults" window is displayed.
    2. Click OK. All COBOL feature customizations are removed, the product's template defaults are restored.
    Enable bidirectional editing Select the Enable BiDi Visual Editing check box.
  3. Click OK.

Feedback