UPDATE UPDATE CONTROL The UPDATE control statements let you insert, delete, and replace source records, as well as resequence the output file.
All references to the sequence field of an input record refer to the
numeric data in columns 73-80 of the source record, or columns 76-80 if NOSEQA is specified. Leading zeros in sequence fields are not required.
If no sequence numbers exist in an input file, a preliminary UPDATE with
only the './ control statement can be used to establish file
sequencing.
sequence numbers are checked while updates are being applied; an
error condition results if any sequence errors occur in the update
control statements, and warnings are issued if an error is detected in
the sequencing of the input file. Any source input records with a
sequence field of eight blanks are skipped, without any indication of a
sequence error. Such records may be replaced or deleted only if they
occur within a range of records that are being replaced or deleted
entirely and if that range has limiti with valid sequence numbers.
There is no means provided for specifying a sequence field of blanks on
an UPDATE control statement.
All UPDATE control statements are identified by the characters './' in
columns 1 and 2 of the 80-byte record, followed by one or more blanks
and additional, blank-delimited fields. Control statement data must not
extend beyond column 50. -- resequences the updated source output file
in columns 73-80 (if SEQ8 is specified), or in columns 76-80 with the
label placed in columns 73-75 (if NOSEQ8 is specified). The format of
the SEQUENCE control statement is: .--- -, I ./ S r seqstrt [seqincr [label]]] I L
seqstrt
seqincr
label _____________________________________________ -J is a one-to eight-digit numeric field specifying the
first decimal sequence number to be used. The default
value is 1000 if SEQ8 is specified and 10 if NOSEQ8 is
specified.
is a one-to eight-digit numeric field specifying the
decimal increment for resequencing the output file.
The default is the "seqstrt" value.
is a three-character field to be duplicated in columns
73-75 of each source record if NJSEQ8 is specified.
The default value is the first three characters of the
input filename (fnl).
If you ase the SEQUENCE statement, it must be the first statement in the
update file. If any valid control statement precedes it; the resequence
operation is suppressed. When the SEQUENCE control statement is the
first statement processed, the sequence numbers in the source file are
checked, and warning message DMSUPD210W is issued for any errors.
Section 2. CMS Commands 203
UPDATE If the SEQUENCE control statement is processed after updates have been
applied, no warning message is issued.
Each source record is resequenced in columns 73-80 as it is written
onto the output file, including unchanged records from the source file
and records inserted from the update file. -- inserts all
next control statement, into the output
control statement is:
records following it, up to the
file. The format of the INSERT r , I . / I seqno [ $ (seqstrt (seqincr]]] , segno $ seqstrt
seqincr
is the sequence number of the record in the source
input file following which new records are to be added.
is an optional delimiter indicating that the inserted
records are to be sequenced by increments.
is a one-to eight-digit numeric field specifying the
first decimal number to be used for sequencing the
inserted records.
is a one-to eight-digit numeric field specifying the
decimal increment for sequencing the inserted records.
All records following the "./ I" statement, up to the next control
statement, are inserted in the output file following the record
identified by the "seqno" field. If the NOINC option is specified, each
inserted record is identified with asterisks (********) in columns 73-80. If either the INC or CTL option is specified, the records are
inserted unchanged in the output file, or they are sequenced according
to the "seqstrt" and "seqincr" fields, if the dollar sign ($) key is
specified.
The lefault sequence increment, if the dollar sign is included, is
determined by using one tenth of the least significant, nonzero digit in
the seqno field, with a maximum of 100. The default seqstrt is computed
as segno plus the default seqincr. For example, the control statement:
./ I 2600 $ 2610 causes the inserted records to be sequenced XXX02610, XXX02620, and so
forth (NOSEQ8 assumed here). For the control statement:
./ I 240000 $
the defaulted seqincr is the maximum, 100, number is 240100. SEQ8 is assumed, so
sequenced 00240100, 00240200, and so forth.
and the starting sequence
the inserted records are
If either INC or CTL is specified but the dollar sign is not
included, whatever sequence number appears on the inserted records in
the update file is included in the output file. 204 IBM VM/370 CMS Command and Macro Reference
Previous Page Next Page