HP OpenVMS Systems

ask the wizard
Content starts here

Merging RMS Indexed Files?

» close window

The Question is:

 
Dear wizzard,
 
I am merging two files Indexed Sequential files (say A and B) and, where
there are dupliacates, I want to keep A's records and discard B's records.
To do this I have been editing file A then INCluding file B to the bottom of
this.
 
I then use the Convert/fdl/nofast command and this converts the file into
ISF format with some expected duplicates being outputed to a file.  However,
the problem is that in certain cases file B's duplicates are being kept
whilst file A's duplicates are d
isgarded.
HELP!
What can I do to stop this happening?
 
Thanks
 
Sam
 


The Answer is :

  The technique described for merging SYSUAF files into a single
  OpenVMS Cluster -- as described in the appendix of the OpenVMS
  Cluster Systems manual -- might be of interest.  The technique
  uses CONVERT, and the documentation descibes how duplicate
  records are handled.  (SYSUAF is an RMS indexed file...)
 
  On the face of it, the command:
 
    $ MERGE/STABLE/NODUPLICATES A,B output
 
  should do exactly what you want. If not, it may be worth considering
  writing a program to preform the merge precisely as you want. This would
  use a minor variation of the classical "Sequential Master File Update"
  algorithm which can be found in any Computer Science text.
 

answer written or last revised on ( 3-NOV-1999 )

» close window