This program performs a handy function (in a somewhat crude fashion). During the development of a program, it is desirable to apply alters only to the most recent version of the program. This approach eliminates the difficulty in determining the correct alter number in the base version, reshuffling the alter deck applying to it, and the difficulty involved in undoing previous alters.
This approach presents its own problems. Storage (somewhere) must be provided for the intermediate versions and careful track must be kept of them. In situations where a log of the changes must be kept, the programmer must then reconcile all the intermediate versions.
The ALTMERGE program takes care of that final reconciliation. In the process, it eliminates the need for storing intermediate program versions and provides an easy way to "back-up" to a previous version.
ALTMERGE reads a file consisting of alter-sets used to produce successive generations of the same program. Each alter-set produces the next version of the program from the current one. ALTMERGE resolves the conflicts between them and produces as output a single alter-set which will generate the most recent program version from the base. This means that one need never keep around intermediate program versions.
Consider the following example: suppose we have a program called "prog00" which we would like to update. We determine the changes necessary to do this and store them in a file called "alter00". Applying "alter00" to "prog00" gives another program; call it "prog01". If "alter00" was not quite sufficient to give the desired result, we might consider creating a new file of changes, "alter01". Applying it to "prog01" gives a new program, "prog02". We may iterate through this cycle until we have our desired result. However, we need never save source versions of "prog01", "prog02", "prog03", and so on; to create a new source version, we take the concatenation of "alter00", "alter01", "alter02", etc., and place our latest set of alters at the end. By running this file through ALTMERGE, we obtain an alter file that can be applied to the base. The listing we obtain is that of the new current version. Successive changes are written against this listing and concatenated on the end of the alter file.
"Backing-up" to a previous version is accomplished by deleting all the alter-sets from a specific location in the concatenated file on to the end.
Three options may be selected by setting of different bits in the program switch word.
The following deck set-up is intended to give an idea of how to use ALTMERGE in connection with a subsequent assembly.
$ lowload $ option cobol $ select userid/obj alter-merge object deck $ execute dump $ limits 25,13k,,20000 $ set 6 generate new alter set $ set 8 sort sets into proper order $ data in,,copy
<successive alter sets go here>
$ endcopy $ file f1,a1r,5l $ file f2,a2r,5l $ file f3,a3r,5l $ sysout lp $ file cp,a4s,5l $ file s1,a5r,5r $ file s2,a6r,5r $ gmap other options $ prmfl g*,r,s,userid/base-src $ set 9 let gmap know about a* $ file a*,a4r,5l
Copyright © 1996, Thinkage Ltd.