Previous Topic Next topic Print topic


Create a Structure File and Record Layouts

Structure files and the record layouts within them cannot be created or viewed in Data File Editor. You must create the structure file and record layouts using the Classic Data File Tools product; after which, you can apply the resulting .str file to your data files in Data File Editor.
  1. From a Visual COBOL or Enterprise Developer command prompt, type mfdatatools, then press Enter.
  2. On the File menu, click New, then select Record Layout and click OK.

    The Select a file to construct the layouts from dialog box appears.

  3. Navigate to and select the debug information file (.idy file) from a program that uses the data file for which you are creating this structure file, then select Open.

    A Layout window appears, showing the Data Division of the COBOL program.

  4. Create a default layout (optional):
    1. From the left-hand pane, right-click the top-level data item on which to base your layout, then select New Layout.

      The New Record Layout Wizard dialog box appears.

    2. Select Default Layout, then click Next.
    3. Click Finish.

    The default layout is displayed in the right-hand pane.

  5. Create a conditional layout (optional):
    1. From the left-hand pane, right-click the top-level data item on which to base your layout, then select New Layout.

      The New Record Layout Wizard dialog box appears.

    2. Select Conditional Layout, then click Next.
    3. Click Finish.

      The conditional layout is displayed in the right-hand pane.

    4. Expand the layout to locate a field on which to base a condition, then double-click it.

      The Field Properties dialog box appears.

    5. Click and select an operator from the Condition list, then add the appropriate value(s) to the right.
    6. Click OK.
    7. Repeat the last three steps if you need to add more conditions. (All conditions must be met for the layout to be used.)
  6. On the File menu, click Save.

    The Save As dialog box appears.

  7. In the File name field, type a name for the structure file, then click Save.

    The structure file is saved. To use it, you must specify its path and filename when creating or opening a data file.

Previous Topic Next topic Print topic