compare Command

The compare command compares items line-by-line to find which lines have been inserted, deleted or changed.

Syntax

compare file.reference itemlist* {(options)}

with:{(file.reference} itemlist

Parameter(s)

options

a

Compares all elements on each attribute. Default is the first three elements, delimited with spaces (assembler source general format).

b

Compares entire first value of attribute. If not specified, only the first three words are compared. This option is used to compare assembly object code.

c

Combines output into one-column format, rather than two-column split-screen format.

d

Does not compare object code addresses. This is intended for compiled assembly language programs.

f

Issues a form feed between each item and starts the display of each item on a new page.

i

Suppresses the message: [409] xxx is not on file.

l

Creates select list of items with differences.

n

Activates the nopage function on output to the terminal.

o

Compares entire attribute, except for the first value. This is used to compare assembly object code by comparing the entire attribute except for the first value and first subvalue within each value.

p

Directs output to system printer, via the spooler.

s

Suppresses display of item-IDs. This is available only with the z option.

z

Lists only lines with differences and displays item-IDs only of identical items.

The compare command produces a comparative listing of each item in the specified item list, indicating where differences occur between the source and target items.

Status Characters

d

Indicates a deleted line.

i

Indicates an inserted line.

Example(s)

compare entity 12345 (zsa

with: (entity,archive 12345

compare bp count (a)

with: count.2

bp count      bp count.2

1 *Count from 1-10 1 *Count from 1-10

2 equ ten to 10 2 ten = 10

3 for i = 1 to ten 3 for i = 1 to ten

4 print i 4 print i

5 next i 5 next i

6 print 6 print

7 end 7 end

8 8

See Also

compare-list Command, File Reference, search-system Command