How to: Reference: |
You can merge two or more data sources, and specify which records to merge and which to sort out, using the Match Wizard. The wizard creates a new data source (a HOLD file), into which it merges fields from the selected records. You can report from the new data source and use it as you would use any other HOLD file. However, you cannot specify a format for the HOLD file. It will be created as a BINARY or ALPHA HOLD file depending on the value of the HOLDFORMAT parameter. The merge process does not change the original data sources.
You select the records to be merged into the new data source by specifying sort fields in the Match Wizard. You specify one set of sort fields (using the BY phrase), for the first data source, and a second set of sort fields for the second data source. The Match Wizard compares all sort fields that have been specified in common for both data sources, and then merges all records from the first data source whose sort values match those in the second data source into the new HOLD file. You can specify up to 32 sort sets. This includes the number of common sort fields.
In addition to merging data source records that share values, you can merge records based on other relationships. For example, you can merge all records in each data source whose sort values are not matched in the other data source. Yet another type of merge combines all records from the first data source with any matching records from the second data source.
You can merge up to 16 sets of data in one Match request. For example, you can merge different data sources, or data from the same data source.
Note: The limit of 16 applies to the most complex request. Simpler requests may be able to merge more data sources.
Access the Match Wizard from the Procedure Viewer in Developer Studio. It uses typical wizard behavior so you can easily navigate from one step in the process to the next.
The Component Connector toolbar opens.
The Open dialog box appears.
The Match Wizard opens, as shown in the following image. It uses typical wizard behavior in which you click a series of Next buttons to navigate from one window to the next. You can also use the Match Preview area to navigate the Wizard.
You can add a Match Alias (how the field appears in the Hold file field list) and a Prefix Operator for each field.
Note: You can remove fields from this list by clicking the Delete button. If you add more than one field, you can also use the Move Up and Move Down buttons to rearrange the order of the fields.
Note: You must have at least one BY field.
The Open dialog box opens.
Step 4 of the wizard opens.
Note: In the following image, the second data source is CENTCOMP and the field added is STATE.
Step 5 of the Match wizard opens, as shown in the following image.
In the following image, the Match Wizard - Summary window opens where you can review the final Match request.
If you select the Create a Report, Create a Graph, or Neither option, Report Painter, InfoAssist, or Procedure Viewer opens, respectively.
For details, see the Creating Reports With WebFOCUS Language manual.
WebFOCUS |