This final UPDATE co •• and produces the file $$$FICA PLIOPT, which is now
the fully updated source file. This method is cumbersome, however,
particularly if you have many updates to apply and they must be applied
in a particular order. Therefore, the UPDATE command provides a multilevel update scheme, which you can use to apply many updates at one
time, in a specified order.
To apply multilevel updates, you must have"a control file, which by
convention has a filetype of CNTRL and a filename that is the same as
the source input file. Therefore, to apply the three update files to
FICA PLIOPT, you should create a file named FICA CNTRL.
A control file is actually a list: it does not contain any actual update
control statements (INSERT, DELETE, and so on), but rather it indicates
what update files should be applied, and in what order. In the case of
a multilevel update, all the update files must have the same filename as
the source file. Therefore, only the need be specified in the
control file to uniquely identify the update file. In fact, if all your
update files have filetypes beginning with the characters UPDT, you need
only specify the unique part of the filetype. The control file for PICA PLIOPT, named PICA CNTRL, may typically look like the following: TEXT MACS PLILIB PICA3 UP3 PICA2 UP2 PICA1 UP1 The first record in the control file must be a MACS record. The
second field in this record must be "KACS," and it may be followed by up
to eight macro library names. Every record in the control file must have an "update level identifier;" in this example, the update level
identifiers are TEXT on the MACS record, FICA1 for the UP1 record, and
so on. The update level identifier may have a maximum of five
characters.
The UPDATE command only uses the MACS identifier under special circumstances.
under "VMFASM EXEC Procedure." Por nov,
these things must be in a control file in
to execute properly.
record and the update level
These are described later, you only need to know that
order for the UPDATE command
To update PICA PLIOPT, then, you vould issue the UPDATE command as
follows:
update fica pliopt (ctl When you use the CTL option, and you do not specify the name of a
control file, the UPDATE command looks for a control file with the
filetype of CNTRL and a filename that is the same as the source file.
From the control file, it reads the filetypes of the updates to be
applied. In this example, it searches for the file FICA UPDTUPl and if
found, applies the updates; then UPDATE searches for FICA UPDTUP2, and
applies those updates, if any. Last it searches for FICA UPDTUP3, and
applies those updates.
Notice that the updates are applied from the bottom of the control
file, toward the top. This becomes important when an update is
dependent on a previous update. For example, if you add some lines to a
file in PICA UPDTUP1, then modify one of those lines in FICA UPDTUP2, it
is important that UPDTUP1 vas applied first.
258 IBM VM/370 CMS User's Guide
page of GC20-1819-2 As Updated April 1, 1981 by TNL GN25-0826
Notice that the updates are applied from the bottom of the control
file, toward the top. This becomes when an update is dependent on a previous update. For example, if you add some lines to a
file in FICA UPDTUP1, then modify one of those lines in FICA UPDTUP2, it
is important that UPDTUP1 was applied first. QI fILES: The example above,
showinq CNTFL and UPDTxxxx files, illustrates a naming scheme using the defaults. You can override the default filetypes for
the control file's filename and filetype, as well as filetypes for the
update files.
If name a control file GROUPA CNTRL, for example, you can specify
the name of the control file on the UPDATE command line:
update fica pliopt a groupa cntrl (ctl
The two levels of update processing shown so far may be adequate for your applications. There is, however, an additional level, or step, in
the update structure that the VMj370 procedures use and which you may want to use also.
These techniques may be useful when you have more than one set of
updates to apply to a source program. For example, you may have two groups of proarammers who are working on different sets of changes for
the saill9 source file. Each group may create several update files, and
have a aniqae control file. When you combine these changes, you could create control file, or you can use what are known as auxiliary
control files.
The upnatina structure for auxiliary control files is based on
conventions for assigninq filenames and filetypes. If a control file
contains an entry that beqins with the characters 'AUX', the UPDATE command assumes that the file 'fn AUXnnnn' contains a list of filetypes,
not UPD!TE control statements. For example, if the file 15 beinq updaten with a control file that contains the record: TEST1 then SAMPLE does not contain UPDATE contains entries indicating the of
which have the same filename, SAMPLE. control statements; it
the update files, all of
Let's expand the example to see
the source file, SAMPLE ASSEMBLE. entries:
how this structure works. We have
TEXT MACS 3676 AUXlIST The file SAMPLE CNTRL contains the Section 13. Proqramming for the Environment 259
Previous Page Next Page