CHANGE Type II Commands C /string l/string 2/ < n I .XXX I * < n I * <VER> > > _ ' ,The CHANGE command is used to "change" a character string to another . 'string withln defined limits and within defined c·olumns. As indicated in the
example above, the standard string delimiting character is the "/". However, 'any character may be used as the string delimiter so long as it is unique (does
not appear within either "string 1" or "string 2"). The "string" specifications
are followed by the vertical and horizontal change counts. These may be used
to specify the number of times the change is to be be repeated vertically and
horizontally. The CHANGE command operates only within the previously
specified "ZONE" settings. '(See the Type II command: ZONE, in this section).
Thus, if the "start" zone is currently set to 10 and the "end" zone is set to 50, only columns 10 through 50 will be scanned for" string 1". If" string 1" is
located within these columns, "string 2" will be substituted for it and data
which previously followed "string 1" will be moved after "string 2". If this
movement causes any non-blank data to be shifted past the "end" zone, data
truncation will occur at the "end" zone column.
The vertical and horizontal "change" counts may be used to indicate the
number of successive lines to be scanned for" string 1" and the maximum
number of occurrences per line to be changed, respectively. The vertical
change count may be specified as: "n" where "n" is a positive decimal integer not greater than the total number of items in the file; ".xxx" to indicate a "named" line to be the last line scanned for the "change"; "*" indicating that
every line through end-of-file is to be scanned for the change. The "VER" option causes a display of only those lines on which a change has occurred.
The CHANGE command does not cause the "current line" to be moved unless
the VER option is used. In this case, the "current" line at the completion of
the command is set to the first line immediately following the last line on
which a change occurred, or to "EOF" if the command ended at "EOF". The
first line to be scanned for the change is always the" current" line.
The horizontal change count may be specified as: "n" where "n" is a positive,
decimal integer indicating the maximum number of occurrences of "string I" per line, to be changed; or "*" to indicate that all occurrences (within the
specified zones) are to be changed. If either the vertical or horizontal change
count is not specified, a default value of "one" is used. NOTES: 1. If vertical and horizontal change counts are not specified, it is not neces­
sary to include the final delimiter character.
2. If "string 1" is "null" (Le., two successive delimiters found with no
intervening data) "string 2" will be inserted starting at the "start" zone
column.
3. If "string 2" is "null" (or missing), "string I" will simply be deleted.
4. By using the "command-hold" (& ) capability (see Section IV -Type I
Commands) with the CHANGE command and using the VER option, the
user may view each successive change made (in a "global change").
Thus, if the user wishes to abort the "global" change, he may do so
having changed only as many lines as the current "logical display" depth
setting.
26
CMS COpy CP DELETE CMS The CMS command will call the CMS SUBSET and will pass to it th"e rest of the data, if any.,. " '". COpy n I .XXX I TOF I / < n I .XXX I / < n I .XXX I / > >
The COpy command is used to "copy" data from one portion of a file to
another portion of the same file. The command requires at least one and no
more than three, parameters. The three parameters are the liT ARGET", the "LOWER LIMIT", and the "UPPER LIMIT", respectively. The "target" item is
the one after which the new data is to be copied. The target may be specified
as: "n" - a positive decimal integer (not greater than the total number of
records in the file) indicating the line number after which data is to be copied; ".xxx" where ".xxX" is a previously defined "named" line; "TOF" indicating
that the target is the top of the file (prior to item number one); or "/" indi­
cating that the "current line" is to be the target. The "target" must be
specified. The second parameter (if included) is the "lower limit" which is
the first item to be copied. The "LOWER LIMIT" may be specified as: "n" - a
positive decimal integer indicating the line number to be the lower limit; ".XXX" indicating that the lower limit is the previously defined "named" line, ".XXX"; or "/" which signifies that the "current line" is to be the lower limit.
If no second parameter is specified, the lower limit will be "/" (the "current line"). The third and final parameter for COpy is the" upper limit". This will
be the last line to be "copied". The upper limit may be specified as: "n" - a
positive, decimal integer (not greater than the total number of records in the
file) signifying the line number to be the upper limit; ".XXX" where ".XXX" is
the previously defined" named" line to be the upper limit; or "I" indicating
that the current line is to be the upper limit. Tile upper limit and lower limit
may refer to the same item in the file in which case only that one item is
copied. If the upper limit is not specified, it defaults to "I" (the current line).
The "UPPER" limit must be equal to or follow the "LOWER" limit within the
file. The "TARGET" item may not be between the "UPPER" and "LOWER" iimits of the "range" nor equal to either the "UPPER" or "LOWER" limit. NOTE: The COpy function may be used to duplicate several successive line
items. However, since the target and the upper limit cannot be the
same, the target should specify the item immediately prior to the
lower limit; in effect, COpy the data prior to rather than after itself. CP The CP command will call CP and pass to it the rest of the command data, if
any.
DEL < n I . XXX I * >
The DELETE command is used to delete items from the file. If no arguments
are specified, only the current line is deleted. Valid arguments are: "n" where "n" is any positive decimal integer (not greater than the total number of items
in the file) indicating the number of consecutive items to be deleted; ".XXX" where ".XXX" is a previously defined "named" line to be the last deleted line
(this line must lie between the "current line" and "EOF"); or "*" indicating
that all lines between the current line and "EOF" are to be deleted. Note
that deletions always terminate if "EOF" is encountered.
Type II Commands 27
Previous Page Next Page