then any subsequent changes you make to the file ACCOUNT written into the file NEWACCT ASSEMBLE. When you issue a
subcommand, your source file remains intact. ASSEMBLE are
FILE or SAVE After your changes to the source program have been tested you can
replace the source file with your new copy.
THE UPDATE PHILOSOPHY While the procedures outlined above for modifying programs are suitable
for many applications, they may not be adequate in a situation where
several programmers are applying changes to the same source code. These
procedures also have the drawback of not providing you with a record of
what has been changed. After using the editor, you do not have a record
of the lines that have been deleted, added, replaced, and so on, unless
you manually add comments to the code, insert special characters in the
serialization column, or use some technique that records program
activity.
The UPDATE command provides a way for you to modify a source program without affecting the original, and it produces an update log,
indicating the changes that have been made. Moreover, it also has the
capability of combining multiple updates at one time, so that changes made by different programmers or changes made at different times can be combined into a single output file.
The UPDATE command is a basic element of the entire VM/370 updating
scheme and is used by system programmers who maintain VM/370 at your
installation. Although the input filetypes used by the UPDATE command
default to ASSEMBLE file characteristics, the UPDATE command is not
limited to assembler language programs, nor is it limited to system programming applications. You can use it to modify and update any
fixed-length, 80-character file that does not have data in columns 72
through 80. UPDATE FILES A simple update involves two input files: The source file, which is the program you want to update An update file, containing control statements that describe the
changes you want to make The control statement file usually has a filetype of UPDATE. For
convenience, you can give it the same filename as your source file. For
example, if you want to update the file SAMPLE ASSEMBLE, you would
create a file named SAMPLE UPDATE. To apply the changes in the update file, you issue the command:
update sample
The default values used by the UPDATE command are filetypes of ASSEMBLE and UPDATE for the source and update files, respectively. If you are
updating a COBOL source program named READY COEOL with an update file
named UPDATE READY, you would issue the command:
update ready cobol a update ready a
252 IBM VM/370 CMS User's Guide
After an UPDATE command completes processing, the input files are not
changed; two new files are created. One of them contains the updated
source file, with a filename that is the same as the original source
file but preceded by a dollar sign ($). Another file, containing a
record of updates is also created; it has a filename that is the same as
the source file and a filetype of UPDLOG. For example: SAMPLE ASSEMBLE SAMPLE UPDATE READY COBOL UPDATE READY $SAMPLE ASSEMBLE SAMPLE UPDLOG $READY COBOL READY UPDLOG NOw, you can assemble or compile the new source file created by the UPDATE command.
The control statements used by the UPDATE command are similar to those
used by the 05 IEBUPDTE utility program or the DOS MAINT program UPDATE function.
Each UPDATE statement must have the characters./ in columns one and
two, followed by one or more blanks. The statements are described
below, with examples. This statement tells the UPDATE command that you
want to number or renumber the records in a file. Sequence numbers are written in columns 73 through 80. For example, the statement: ./ S 1000
indicates that you want sequence numbering to be done, in increments of
1000, with the first statement numbered 1000. The SEQUENCE statement is
convenient if you want to apply updates to a file that does not already
have sequence numbers. In this case, you may want to use the REP
(replace) option of the UPDATE command, so that instead of creating a
new file ($filename), the original source file is replaced:
update sample (rep INSERT Statement: This statement precedes new records that you want to ada-to -a-source file. The INSERT statement tells the UPDATE command
where to add the new records. For eXample, the lines:
./ I 1600 TEST2 TM BNO HOLIDAY,X'02' VACATION HOLIDAY? NOPE ••• VACATION result in the two lines of code being inserted into the output file
following the statement numbered 00001600. The inserted lines are
flagged with asterisks in columns 73 through 80. The INSERT statement
also allows you to request that new statements be sequenced; see "Sequencing Output Records."
DELETE Statement: This statement tells the UPDATE command which records yoU-want-to-delete from the source file. If your UPDATE file contains:
./ D 2500 Section 13. Programming for the CMS Environment 253
Previous Page Next Page