[Access to Wang masthead]

New Dog, Old Tricks

Merging documents using PC word processing products

From "Migration",  Access to Wang, February 1996
  [ Prior Article ]     [ Return to the Catalog of articles ]     [ Next Article ]  

Continuing our coverage of replacing the functionality of Wang Word Processing with other products, this month we'll cover document merge capabilities.

As the first minicomputer system to combine data processing and document capabilities, the Wang VS attracted many applications that merged the two technologies. Many of these applications are still in use because the integration was so powerful. As PC word processing programs grew in popularity and gained publication- quality output, Wang WP may no longer be enough.

As before, my examples will be drawn from specific products (Microsoft Word for Windows, for one) but should be applicable to other PC and Macintosh products. I will also presume you have a way to transfer files from your VS to your desktop systems - should the VS be the location of your primary data.

The merge process

Before looking at specific methods let's review the components and requirements for a typical merge application. Picture a V- shaped diagram, where a main document (known as a primary document in Wang WP manual) is melded with a table of information (known as a secondary document to Wang users) to produce a combined output. The output may be a new document (the approach Wang WP uses) or a print file. A typical example is a standard form letter that is sent to a varying list of recipients, where the recipient's name, address, and other information is merged into the stock letter format.

The main document is similar to a regular document, with all of the formatting and other characteristics required for a pleasing output. The locations of data fields to be merged are held with special characters (the MERGE symbol in Wang WP).

Secondary documents resemble data files, with rows and columns of data . These rows and columns correspond to records and fields in conventional data processing, but unlike most VS data files the fields are variable in length and separated with delimiters. Wang WP secondary documents require MERGE symbols between fields and a DON'T MERGE symbol at the end of each line.

When the Wang WP merge is performed, fields are taken from the columns in the secondary document and matched (in their order of appearance) with merge placeholders in the primary document to produce the final result. This process is performed using the Document Merge option of the COPYWP utility. Screens accept the document IDs of the primary and secondary documents and the ID of the document to be created by the merge (or "next" for the next document ID in a library). If the result is larger than the largest allowable size for a WP document (120 pages), COPYWP will create multiple documents.

Document merging with PC word processing products is similar to the WP process described above. Like WP, PC products use a main document, merge symbols, and delimited data file for input. Still, there are some significant differences:

In short, those familiar with the process of creating Wang WP merge documents should find the transition to other word processing products easy. The hard part - now as before - lies in creating the variable information to be merged.

Creating merge data files

Secondary documents (data) can be created manually by entering information and the appropriate delimiters, but this is a time- consuming and error-prone process. Larger, more frequent application needs dictate an automated approach. There are several ways Wang users have approached this need:

Whatever the method used to create the secondary document, the field sizes must vary according to the actual length of the data so that trailing spaces are not inserted into the merged output where they are not desired. Fixed-length data files (see Figure 1) - the type most prevalent in data processing environments - will have this additional space at the end of each field. The desired output is shown in Figure 2, which also illustrates the use of field names in the first record of the file.

Of course, if the source of your primary business information is a LAN-based data base or a spreadsheet, the conversion process is much different. Most PC data base and spreadsheet products allow conversion to text format with tabs separating, and some will even link directly to your word processing software, eliminating the need to convert. Watch out for some conversions, though; recent products have including unwanted formatting information (font, size, weight, etc.) along with the text, overriding the characteristics in the primary document.

Selecting merge tools

Much of the time the tools used for merge applications are a given, as when the organization has standardized on a particular word processing program and wants all work to be within that format. If you are new to the market for PC tools and have simple needs, I suggest you consider one of the several integrated ("works") products , which combine spreadsheet, word processing, and data base functions into a single, integrated environment. Such products are easier to use and inexpensive; many are shipped with computer systems for no additional charge. While not as rich in features as their more expensive siblings, integrated products offer good functionality and easier integration.

Wang online support

Interest in further Wang online information has continued to grow - probably due to the demise of nearly all user support organizations. The Wang user group in the United Kingdom continues to operate; you can view samples of their excellent newsletter through the Thomas Junker's Unofficial Wang VS Information Center, a World Wide Web page located at address http://www.phoenix.net/~tjunker/wang.html. And contact me through the magazine if you have any comments or questions on integration or migration.


Figure 1: Fixed-field data file


Record           1         2         3         5         6
Number  12345678901234567890123456789012345678901234567890

  1     Flintstone     Fred          Bedrock              <
  2     Rubble         Barney        Gravelstone          <
  3     Barnes         Dennis        Seattle              <

Legend:

< Record delimiter (RETURN character or DON'T MERGE symbol)


Figure 2: Variable-field data file


Record           1         2         3         5         6
Number  12345678901234567890123456789012345678901234567890

  1     first_name^last_name^city<
  2     Flintstone^Fred^Bedrock<
  3     Rubble^Barney^Gravelstone<
  4     Barnes^Dennis^Seattle<

Legend:

^ Field delimiter (tab character or MERGE symbol)

< Record delimiter (RETURN character or DON'T MERGE symbol)


  [ Prior Article ]     [ Return to the Catalog of articles ]     [ Next Article ]  


Copyright © 1996 Dennis S. Barnes
Reprints of this article are permitted without notification if the source of the information is clearly identified