Define data for use with an individual program in a project as follows:
A Data Set Designer window is opened with a new data set icon.
It is best to assign a data set name that is different from your data layout name. If your data layout name is clients, for example, you might call your data set clients-ds. Both the data layout name and the data set name appear in the Event Editor's Message drop-down list, so assigning different names helps to prevent confusion.
Because each data set represents a specific manner in which a data file will be used by your program, a DLT with multiple keys may be associated with multiple data sets. In other words, if you have defined more than one key for a file in your DLT, you can define one data set for each key that the program will use to perform file operations.
Select a data set from the list on the left, then click the right-arrow icon to move the data set name to the list on the right. If the default reference field is not correct, click in the Reference Field column and select the correct field from the drop-down list.
This generates a paragraph similar to the following that you can perform as needed:
Acu-cl-ds-Ref-pet-ds. INITIALIZE pet-record OF pets MOVE cl-client-id OF clients TO pet-owner-id OF pets PERFORM Acu-pet-ds-Read.
When you are finished, click OK.
Here, you can determine whether or not AcuBench will generate OPEN code for each data file associated with a data set in your program. You can also determine an open mode (Input, I/O, Extend, or Output), specify a locking mode, and determine what data handling code will be generated within this program.
By default, the type of file handling code that AcuBench generates is based on the open mode that you select. If you select Output mode, for example, AcuBench's default behavior is to generate WRITE code but not READ code. Expand the IO Operation drop-down list for each file to select or de-select code paragraphs to be generated.
When you are finished, click OK.
The file handling code that you have specified is generated, and the data items described in the data layout file are made available to the other AcuBench design interfaces (for use, for example, with tools like the Screen Designer and Report Composer Drag-and-Drop interface).