Merging .SBF Files The flexible file import facility provided in Superbase makes the merging of .SBF files an easy process. In the majority of applications, files to be merged have the same file structures. Consequently, this technote describes the merging process as applied to .SBF files with identical file definitions, so the records in both files contain an identical number of fields with the same field order, data types and formats. For information on merging files with dissimilar file definitions, refer to the Working with Data manual. The objective of the merge operation is to merge the contents of a source file with those of a destination file. The merge process adds the records of the source file to the existing records of the destination file, and, the contents of the source file are left unchanged. The following procedures are described in detail. Open an .SBF File From the Superbase main menu, select Open from the File menu, then File to open the Open File dialog box. Select or type in the path and name of DestName.SBF, the file to be opened, and click OK. If a network version of Superbase is running, the Shared Access dialog appears. Set the access options desired, or accept the default options, and click OK to complete the file opening process. DestName.SBF opens and its name appears in all caps, like DESTNAME.SBF, in the box provided in the upper left corner of the screen just below the Superbase title bar. Make an empty copy of the destination file It is often useful to generate an empty repository copy of the destination file that has an identical file definition but contains no data. Open the destination file DestName.sbf using the aforementioned procedure. With DestName.sbf open, select New from the File menu, then File to open the New File dialog box. Select the Empty copy option by clicking the check box provided. While still in the New File dialog box, type the path and file name for the empty file copy DestCopy.SBF. To make it easier to remember, name empty copies with names that are similar to their originals, with some unique characters indicating they are empty copies. Once you type the empty copy file name, click OK to complete the empty file creation process. DestCopy.SBF is created and its name appears in all caps, like DESTCOPY.SBF, in the box provided in the upper left corner of the screen just below the Superbase title bar. Backing up the destination file The merge process alters the contents of the destination file. As a safeguard, it is a good idea to make a backup copy of the destination file before executing a merge. Using the Reorganize utility to reorganize an .SBF file to a different file name is one of the best ways of making a backup copy. Open the destination file DestName.SBF using the procedure described above. Select Reorganize from the Utilities menu. This opens a dialog box indicating that reorganizing a file may take some time. Click OK to continue with the reorganize process, which brings up a Destination File dialog box. Type in the path and file name of the backup file DestBack.SBF. To make it easier to remember, name backup files with names that are similar to their originals with some unique characters indicating they are backups. Once you type the backup file name, click OK to complete the file backup copy process. DestBack.SBFf is now created and its name appears in all caps, like DESTBACK.SBF, in the box provided in the upper left corner of the screen just below the Superbase title bar. Merge the .SBF files Open the destination file DestName.SBF using the aforementioned procedure. With DestName.SBF open, select Import from the File menu, which opens the File Import dialog box. Select Merge into existing file by clicking on the corresponding button. While still in the File Import dialog box, select Superbase merge from the selection list and click OK. This opens the Filename dialog box. Select or type in the path and name of the source file SrceName.SBF and click OK, This opens the Import Filter dialog box. Enter the filter formula for the source file if one is required, or leave the filter formula box blank if not required, and click OK to complete the file merge process. The contents of SrceName.SBF are merged with the contents of DestName.SBF. The contents of SrceName.SBF are left unchanged. Program: Superbase Versions: 2.0 Date: November 19, 1993 D Date: