When you specify a copybook, you have the opportunity to 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.
NOTE: 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
- If you specified separate copybooks for input and output, separate tabs are provided in the editor for each of the copybooks; <host transaction name> input source (in.cbl) and <host transaction name> output source (out.cbl.)
- You can always open the Copybook Editor by choosing Copybook Source Editor from the right-click menu on the Host Transaction.
- If you imported multiple copybooks (concatenated) or a single copybook for both input and output, the copybook in the editor is named <host transaction name> input and output source (inout.cbl.)
- In a Windows environment, copybook files are saved in the
Copybook files are held in a temporary directory during editing,
<user_home>\Attachmate\Verastream\TransactionIntegrator\Designer\workspace\<project_name>\tmpmerged. When the project is saved all copybooks are copied to their final location. If the project is not saved, the temporary files are removed.
- If a copybook is not available as a separate file or must be assembled from another source, you can manually enter or copy and paste copybook data into a blank Copybook Editor.
To bring up a blank Copybook Editor, specify a new Host Transaction and skip the Import Copybook step. A blank Copybook Editor opens.
- When a change is made to the copybook an * (asterisk) is added to the project label and heading and the Save function is enabled. If saved at this point, copybooks are saved with the rest of the designer project. However, you can review the Host Transaction and Client Operation, using the modified copybook, before you save your entire project using the Synchronize with Copybook Source option.
|To edit a copybook
- 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.
- Edit the copybook as needed. There are a full range of editing capabilities available to you; copy, paste, undo, find, and replace for example.
Any errors that occur are immediately shown within the editor. See Editing Copybooks with Syntax Errors for more information.
- 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 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 designer 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.
WARNING! 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.
- When you have completed editing and corrected all syntax errors, save the copybook using the main project Save function.