Creating a New or Editing an Existing XREF Member


A record layout cross reference (XREF) is used to automatically match record layouts to data records for those functions that use layouts to format data. An XREF is needed when the data being formatted requires more than a single record layout. The XREF is a cross-reference between each data file record and the corresponding layout. For more information, see XREF-Processing.

The XREF editing function in File-AID/Eclipse enables you to create and maintain XREF members in an existing XREF PDS. With the XREF editor, you can create a permanent member of a PDS that contains the rules for selecting a record layout. The rules are based on the data conditions found in each record.

Important

  • XREFs should only be created or edited with File-AID/Eclipse or File-AID/MVS.
  • To create a new XREF PDS, allocate it by selecting File > New > Other > BMC > PDS or Sequential Dataset, then specifying on the Allocate Dataset dialog box the dataset attributes Record format of VB, Record length of 300, and Block size of 304.

The File-AID/Eclipse XREF editor includes:

  • An XREF description field.
  • A Layout PDS (used as default) dropdown list field used to specify the desired layout dataset.
  • A Length of the filler field where you can optionally specify the length of filler to be added to the beginning of the layout.
  • A Layouts list displaying the Member, Beginning Field, Description, and Usage for each member in the selected layout PDS. Members with a Usage of Base include layout selection criteria and are listed above the Default member (optional), which cannot include selection criteria.
  • A Layout selection list associated with the member selected in the Layouts list above it. The Layout selection list displays the Field, Operator, and Value that control whether the layout member is to be used.

The Layouts and Layout selection lists both include the following buttons:

  • image2022-11-10_20-12-32.pngAdd. In the Layouts list, click XREFs should only be created or edited with File-AID/Eclipse or File-AID/MVS. to open the XREF Layout Definition dialog box and create a new layout member. In the Layout selection list, click Add to open the Layout Selection Criteria dialog box and define new layout selection criteria.
  • image2022-11-10_20-12-57.pngEdit. In the Layouts list, click Edit to open the XREF Layout Definition dialog box for the selected layout member. In the Layout selection list, click Edit to open the Layout Selection Criteria dialog box for the selected field conditions.
  • image2022-11-10_20-13-27.pngRemove. In the Layouts list, click Remove to delete the selected layout member. In the Layout selection list, click Remove to delete the selected field conditions.
  • image2022-11-10_20-13-43.pngDuplicate. In the Layouts list, click Duplicate to create a copy of the selected layout member for further editing. In the Layout selection list, click Duplicate to create a copy of the selected field conditions for further editing.
  • image2022-11-10_20-13-59.pngand image2022-11-10_20-14-13.pngMove Up and Move Down. In either of the list views, click Move Up or Move Down to change the relative position of the selected layout member or field conditions. File-AID/Eclipse evaluates the lists from top to bottom, automatically selecting the first match found. 

    Important

    Segmented XREFs and XREFs with multiple SETs of Criteria are READ ONLY in File-AID/Eclipse.

To create a new XREF member

  1. Either click the toolbar File-AID icon Data Editor icon.JPG, select XREF Editor>New Member, and continue with step 3, or select File>New>Other (or press Ctrl+n) to display the New Select a Wizard dialog box.
  2. Expand BMC and select XREF, then click Next. The Allocate XREF dialog box appears.
  3. In the Host field, select the host that contains the PDS in which the new XREF member is to be created. Click Configure if you want to configure a new host connection. See BMC-AMI-DevX-Workbench-Host-Explorer-User-Guide
     for how to configure a new host connection.
  4. In the XREF dataset field, either select a dataset from the dropdown list or click Browse and use the Dataset Selection dialog box to specify the desired PDS.
  5. In the Member field, specify the desired XREF member name.
  6. In the Default layouts dataset field, either select a layout dataset from the dropdown list, or click Browse and use the Dataset Selection dialog box to specify the desired layout dataset.
  7. In the Layouts language field, select COBOL or PL/I.
  8. In the XREF description field, enter a description of the new XREF member being created.
  9. Click Finish. The XREF editor opens with the new member selected. The XREF dataset and member name are displayed at the top of the editor view along with any messages. For example, a new XREF member will initially present the message XREF has no layout definitions.
  10. Edit the new XREF, beginning at step 2, as described in To edit an existing XREF below.

To edit an existing XREF

  1. Either right-click the XREF member you want to edit in Host Explorer, select Edit XREF, and continue with step 6 below, or click the toolbar File-AID icon and select XREF Editor > Existing Member. The Edit XREF dialog box appears. 

    Important

     If the member selected in Host Explorer is not a File-AID XREF, the Edit XREF choice will not appear on the right-click menu.

  2. In the Host field, select the host that contains the PDS in which the desired XREF member exists. Click Configure if you want to configure a new host connection. See BMC-AMI-DevX-Workbench-Host-Explorer-User-Guide for how to configure a new host connection.
  3. In the XREF dataset field, either select a dataset from the dropdown list or click Browse and use the Dataset Selection dialog box to specify the desired PDS.
  4. In the Member field, specify the desired XREF member name.
  5. Click Finish.
  6. When the XREF editor appears, edit the text in the XREF description field as desired.
  7. Either select a layout PDS from the Layout PDS (used as default) dropdown list, or click Browse and use the Dataset Selection dialog box to specify the desired layout dataset.
  8. Optionally, specify a filler value in the Length of the filler field to have a filler displayed at the start of each record concatenated to each base layout.
  9. To specify a new layout member, click Add for the Layouts list. To edit an existing layout member, select the desired layout and click Edit for the Layouts list.
  10. Specify a layout member, beginning field, and description, and, if the layout will be used as default, select the Use as the default layout checkbox. Click OK to save the layout entry to the Layouts list.
  11. To delete a layout member, select it and click Remove.
  12. To create a copy of a layout member entry to use as a template, select it and click Duplicate. Edit the new copy as required.
  13. To change the processing sequence for layout members, select a layout member entry and click Move Up or Move Down. Repeat as needed to sort the entries into the desired order. The Default layout member always remains at the bottom of the Layouts list.
  14. To specify new or edit existing selection criteria, select a member from the Layouts list, then either click Add to specify new criteria or select an existing field condition and click Edit to modify existing criteria. The Layout Selection Criteria dialog box appears.
  15. In the Field area, select either Formatted or Unformatted field type. If you select Formatted, enter the desired field name in the Field field or click Select to choose from a list. If you select Unformatted, enter the Location and Length, then select the Data type from the dropdown list. 

    Important

    An XREF cannot contain both Formatted and Unformatted field types, and changing the Field type from Formatted to Unformatted will cause all other criteria for that XREF to become unformatted.

  16. In the Condition area, select an Operator from the dropdown list, specify the desired Value, then click OK.
  17. To delete a field condition, select it and click Remove.
  18. To create a copy of a field condition to use as a template, select it and click Duplicate. Edit the new copy as required.
  19. To change the processing sequence for field conditions, select an entry and click Move Up or Move Down. Repeat as needed to sort the entries into the desired order. The entries are processed from top to bottom with the first match being used.
  20. When done editing, click the Save toolbar button to save without closing the XREF editor, or close the editor tab and select Yes from the Save Resource dialog box.


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*