SirLib update example
Notice that sequenced versions of procedures do not apply to New, Erase
or Resequence operations.
Also note that Q is the managed update equivalent of a Copy, just as N is the
equivalent of Create, and K is the equivalent of Delete.
XCOMPARE has no direct equivalent in the unmanaged command structure, though
coupled with later reconfiguration using the output update procedure it is analogous
to moving finished changes to a staging area.
Resequencing is of course a special purpose function with no unmanaged corollary.
In the example above, procedure TEMP
exists in file PFILE1
(upper left).
The programmer uses the Q command to copy TEMP
into WORKFILE
, getting
both a working and a SEQ version of the procedure.
A single line of new code is inserted in TEMP
(the line
PRINT STATE AND ZIP AT 40
).
Using XCOMPARE, the update is generated to file CHANGES
, and named
PFILE1.CHG1.TEMP
.
A project leader defines the project name CHG1
in CONTROL.PFILE1
.
Finally, SirLib's Reconfiguration function, described in the Configuring files (applying updates) section, is used to create a Base version of the procedure, so the update
can be backed out if necessary, and the original procedure TEMP
is deleted. The update procedure PFILE1.CHG1.TEMP
is applied to BASE.TEMP
to create the new
executable procedure TEMP
.
The final state of PFILE1
is shown lower right.