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.
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:
Add. In the Layouts list, click XREFs should only be created or edited with File-AID/Eclipse or
. 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.
Edit. 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.
Remove. 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.
Duplicate. 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.
and
Move 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.
To create a new XREF member
- Either click the toolbar File-AID icon
, 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.
- Expand BMC and select XREF, then click Next. The Allocate XREF dialog box appears.
- 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. - 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.
- In the Member field, specify the desired XREF member name.
- 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.
- In the Layouts language field, select COBOL or PL/I.
- In the XREF description field, enter a description of the new XREF member being created.
- 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.
- Edit the new XREF, beginning at step 2, as described in To edit an existing XREF below.
To edit an existing XREF
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.
- 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.
- 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.
- In the Member field, specify the desired XREF member name.
- Click Finish.
- When the XREF editor appears, edit the text in the XREF description field as desired.
- 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.
- 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.
- 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.
- 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.
- To delete a layout member, select it and click Remove.
- 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.
- 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.
- 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.
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.
- In the Condition area, select an Operator from the dropdown list, specify the desired Value, then click OK.
- To delete a field condition, select it and click Remove.
- To create a copy of a field condition to use as a template, select it and click Duplicate. Edit the new copy as required.
- 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.
- 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.