Edit Copybooks

When you specify a copybook, you can make whatever changes are needed to successfully implement the host transaction and to create a client operation. You specify copybooks using the new Host Transaction wizard, or if you are modifying already specified copybooks, the Import Copybook wizard. At the completion of each wizard, the Copybook Editor displays the selected copybook source.

If you import more than one copybook, the copybooks are concatenated in the sequence in which they were chosen in the Import dialog box. If you imported one copybook, a copy of the selected copybook is displayed in the editor.

Using the Copybook Editor

To edit a copybook

  1. Verify that you have a current copybook open in the Copybook Editor. The copybook displays in the Copybook Editor as a result of stepping through either the Import Copybook or Host Transaction wizard.

    If you specified separate copybooks for input and output, a separate editor opens for each of the copybooks. Click the tab with the appropriate name to toggle between them.

  2. Edit the copybook as needed. There are a full range of editing capabilities available to you; for example, copy, paste, undo, find, and replace.

    Any errors that occur are immediately shown within the editor. See Editing Copybooks with Syntax Errors for more information.

  3. You can review the host transaction and client operation using the new copybook before you save the entire project. To synchronize the copybook source into the host transaction and client operation, click  Action toolbar button   on the toolbar, or alternatively, open the Action menu and click Synchronize with Copybook Source.

    When you synchronize the copybook, the modified copybook is imported into the studio project and the host transaction and client operation are updated accordingly. If you have separate input and output copybooks, the synchronizing function uses the contents of both to update the host transaction and client operation.

    Always save the modified copybook through the main project. You can view the host transaction or client operation editors during the copybook editing process, but the updated copybook information will not be reflected until you synchronize. Changes made to the host transaction or client operation are not visible in the copybook.

  4. When you have completed editing and corrected all syntax errors, save the copybook using the main project Save function.

Related Topics
Bullet Import Copybooks
Bullet Editing Copybooks with Syntax Errors
Bullet About COBOL Copybooks
Bullet Declare a Host Transaction