You can use the AcuBench Event Editor to code BEFORE and AFTER procedures for file operations. By default, this code is generated
in the program's .evt COPY file.
To add code to be executed before or after file operations on a particular file, do the following:
- In the Structure view of the Workspace window, open the desired Program node and double-click the Data Set node. The Data Set Designer window opens, showing an icon for each data set.
- Select the desired data set, then click the Event tab of the Property window.
If the Property window is not visible, select Property Window from the View menu, or click the Property Window button on the Standard toolbar.
- In the Event tab, locate the type of procedure that you want to add in the Item list and click in the adjacent Value field. If you have
already written the paragraph that you would like invoked before or after the selected file operation, select that paragraph
from the Value drop-down list. Otherwise, click the browse (...) button, accept or modify the name in the Add Paragraph dialog, and click OK.
The program’s .evt file is opened in the Event Editor and a new paragraph is inserted. Code the rest of the procedure.
Procedures that you enter here are performed immediately before or after the associated AcuBench file handling paragraph is
executed. A Before Read paragraph, for example, is performed immediately before the Acu-datasetname-Read (or Read-Next or Read-Prev) paragraph, each time the latter paragraph is invoked.
- When you are finished coding a BEFORE or AFTER paragraph, you can close the Event Editor to return to the Data Set Designer.
If you are planning to add more BEFORE and AFTER code, you can select another paragraph type from the Message drop-down list at the top of the design window and continue adding code.