Defining Data Files for Use in Projects and Programs

As described in Workbench Concepts, programs in AcuBench are organized into projects. A project is a group of interrelated programs, some or all of which may make use of a shared set of COPY files, resources, and data files. For this reason, when you set out to define data files for use by AcuBench programs, the first step is to create a definition at the project level.

The project-level definition for a data file is created in the File Designer, which is accessed through the Data view of the workspace.

This definition is stored in a data layout file, or DLT. The DLT contains information that AcuBench uses to generate SELECT, File Description, and Sort COPY files, as well as extended file descriptions (XFDs). These files can be used by any program within the project for which the DLT has been defined.

The DLT also contains information about whether and how to generate file handling code in those programs that make use of the data file. You can choose to use no generated file handling code, to use default generated code, or to use code paragraphs that you write and store in the DLT.

If you are working with multiple projects that share one or more data files, you need to define the data layout for each file only one time. Once the DLT has been created in one project, you can easily add it to other projects.

The process of defining data files for use at the project level is as follows:

  1. In the Workspace window’s Data view, use the File Designer to do one of the following:
  2. Use the File Control, Definition, and Key tabs of the File Designer to create or update the FD, SELECT, and SORT definitions for the file (see Adding File Control Information, Adding a File Description, and Defining Key Information).
  3. Use the IO Handling tab of the File Designer to specify whether AcuBench should generate file handling code for the file (see Defining File Handling Behavior).

    This is also where you enter any custom file handling code that you would like AcuBench to associate with the data file and make available to any program that uses the file.

  4. Use the XFD tab of the File Designer to establish any XFD directives that you would like to include in an extended file descriptor (see Designing a Custom XFD).
  5. Close the File Designer, then generate new FD and SELECT COPY files from the new or revised data layout file. To do this, right-click the icon for your new DLT in the Data view and select Generate FD/SL from the pop-up menu.

    The COPY files are assigned a .fd and .sl extension and, by default, placed in the project’s FD folder.

Once you have generated your FD and SELECT COPY files, you are ready to define how individual programs in your project will access your data files. This is accomplished using the Data Set Designer, described in Using the Data Set Designer.