SuperC can merge two files together to produce a third, combined version. The merged file contains control information to allow the user how to ensure that the final version is a correct combination of the two input versions.
Two sample files are shown here, with a third which is the result of the SuperC merge process. A line by line guide is then given as to what the control information means.
Merge file (old) LINE 1 LINE 2 LINE 3 1 LINE 4 IS DELETED ON THE NEW FILE LINE 5 LINE 6 LINE 7 LINE 8 LINE 9 LINE 10 LINE 11 WHICH IS DELETED ON THE NEW FILE LINE 12 NOW THE LINE NUMBERS MATCH AGAIN LINE 13 LINE 14 LINE 15 Merge file (new) LINE 1 LINE 2 LINE 3 LINE 5 LINE 6 IS CHANGED ON THE NEW FILE LINE 6A IS INSERTED AFTER A CHANGED LINE LINE 7 LINE 7A WHICH IS INSERTED ON THE NEW FILE LINE 8 LINE 9 IS NOW ON LINE 10 BUT IDENTIFIED AS A CHANGE LINE 10 LINE 12 NOW THE LINE NUMBERS MATCH AGAIN LINE 13 LINE 14Merging these two files will create an output file like this, with SuperC control statements inserted:
Merged result *HDR1 USER01.USER.CLISTB(COM2) *HDR2 USER01.USER.CLISTB(COM1) *M- MAT#= 1 N-REF#=000001 O-REF#=000001 LINE 1 *I-RF INS#= 1 N-REF#=000002 O-REF#=000002 LINE 2 *D-RF DEL#= 1 N-REF#=000002 O-REF#=000002 LINE 2 *M- MAT#= 1 N-REF#=000003 O-REF#=000003 LINE 3 *D- DEL#= 1 N-REF#=000003 O-REF#=000004 LINE 4 IS DELETED ON THE NEW FILE *M- MAT#= 1 N-REF#=000004 O-REF#=000005 LINE 5 *I-RP INS#= 2 N-REF#=000005 O-REF#=000006 LINE 6 IS CHANGED ON THE NEW FILE LINE 6A IS INSERTED AFTER A CHANGED LINE *D-RP DEL#= 1 N-REF#=000005 O-REF#=000006 LINE 6 *M- MAT#= 1 N-REF#=000007 O-REF#=000007 LINE 7 *I- INS#= 1 N-REF#=000008 O-REF#=000007 LINE 7A WHICH IS INSERTED ON THE NEW FILE *M- MAT#= 1 N-REF#=000009 O-REF#=000008 LINE 8 *I-RP INS#= 1 N-REF#=000010 O-REF#=000009 LINE 9 IS NOW ON LINE 10 BUT IDENTIFIED AS A CHANGE *D-RP DEL#= 1 N-REF#=000010 O-REF#=000009 LINE 9 *M- MAT#= 1 N-REF#=000011 O-REF#=000010 LINE 10 *D- DEL#= 1 N-REF#=000011 O-REF#=000011 LINE 11 WHICH IS DELETED ON THE NEW FILE *M- MAT#= 3 N-REF#=000012 O-REF#=000012 LINE 12 NOW THE LINE NUMBERS MATCH AGAIN LINE 13 LINE 14 *D- DEL#= 1 N-REF#=000014 O-REF#=000015 LINE 15SuperC combines the files where no differences are found. Where differences are found, it puts lines from both files into the output, with control lines to say what it has done. You then delete the control lines plus those lines you do not want - i.e. from either the old or new file. The control lines start in column 1 with an asterisk, followed by the control information. Note that the legend
*****SUPERC CHANGE HEADER*****normally appears on the right on each control line. These have been edited out of the illustration to simplify it. The possible SuperC control codes are:.
*HDR1 *HDR2 *D- *D-RF *D-RP *I- *I-RF *I-RP *M-
*HDR1 USER01.USER.CLISTB(COM2) *HDR2 USER01.USER.CLISTB(COM1)*HDR1 identifies the NEW version, *HDR2 identifies the OLD version.
Recommended: delete both lines
You may want to delay doing the deletion until after completing the actions outlined below, so that you can remind yourself which version is the New and which the Old.
*M MAT#= 1 N-REF#=000001 O-REF#=000001shows data lines that are the same on both files *M shows that matched lines have been found. MAT# shows how many matched lines there are. N-REF# and O-REF# are the line numbers in the new and old files, respectively, where the match was found. The data lines follow the *M line.
Recommended: delete the *M header line.
*I-RF INS#= 1 N-REF#=000002 O-REF#=000002 ...new file data lines *D-RF DEL#= 1 N-REF#=000002 O-REF#=000002 ...old file data lines*I-RF shows that some lines have been reformatted on the new file. INS# is the number of reformatted lines. The new lines follow the *I-RF line. *D-RF is the header for the reformatted lines from the old file. DEL# is the number of reformatted lines. The old lines follow the *D-RF line.
Recommended: Decide which set of reformatted lines you want and delete the others, then delete the SuperC control lines
*M- MAT#= 1 N-REF#=000003 O-REF#=000003*M indicates matched lines, MAT# shows how many. N-REF# and O-REF# are the line numbers in the new and old files. The data lines follow the *M line.
Recommended: delete the *M header line.
*D- DEL#= 1 N-REF#=000003 O-REF#=000004 ...old file deleted lines*D shows that lines have been deleted from the old file. DEL# is the number of deleted lines.
Recommended: delete the lines if they are not required in the new file, then delete the control line.
*M- MAT#= 1 N-REF#=000004 O-REF#=000005*M indicates matched lines, MAT# shows how many. N-REF# and O-REF# are the line numbers in the new and old files. The data lines follow the *M line.
Recommended: delete the *M header line.
*I-RP INS#= 2 N-REF#=000005 O-REF#=000006 ....lines from the new file *D-RP DEL#= 1 N-REF#=000005 O-REF#=000006 ....lines from the old file*I-RP is used where lines are replaced rather than reformatted. It is therefore much more common that *I-RF and *D-RF. INS# is the number of new lines. The new lines follow the *I-RP line. *D-RP is the header for the deleted lines from the old file. DEL# is the number of deleted lines. The old lines follow the *D-RF line.
Recommended: select which set of lines you want, delete the other set and delete the control line
*M- MAT#= 1 N-REF#=000007 O-REF#=000007*M indicates matched lines, MAT# shows how many. N-REF# and O-REF# are the line numbers in the new and old files. The data lines follow the *M line.
Recommended: delete the *M header line.
*I- INS#= 1 N-REF#=000008 O-REF#=000007*I- shows lines inseted on the new file. INS# is the number of new lines.
Recommended: decide whether you want the lines, delete them if not, then delete the control line.
*M- MAT#= 1 N-REF#=000009 O-REF#=000008*M indicates matched lines, MAT# shows how many. N-REF# and O-REF# are the line numbers in the new and old files. The data lines follow the *M line.
Recommended: delete the *M header line.
*I-RP INS#= 1 N-REF#=000010 O-REF#=000009 *D-RP DEL#= 1 N-REF#=000010 O-REF#=000009This illustrates that line numbers need not be the same for a changed line to be identified.
*M- MAT#= 1 N-REF#=000011 O-REF#=000010Recommended: as always, to delete the matched lines header
*D- DEL#= 1 N-REF#=000011 O-REF#=000011
Recommended: decide if the deleted lines are needed or not, delete them as appropriate, then delete the control line.
*M- MAT#= 3 N-REF#=000012 O-REF#=000012Recommended: as always, to delete the matched lines header
*D- DEL#= 1 N-REF#=000014 O-REF#=000015Recommended: decide if the deleted lines are needed or not, delete them as appropriate, then delete the control line.
[Home]
Last updated: 21 Jan 2002