RMERGE

Syntax

── RMERGE ─┬─<file title>─┬───────────────────────┬────────────────────┤
           │              └─<sequence range list>─┤
           └─<sequence range list>──<file title>──┘

Explanation

The RMERGE command copies a file specified as <file title> into the work file, collating the sequence numbers from both files and preserving the <file title> records wherever matching sequence numbers occur.

The <sequence range list> construct limits the RMERGE to specific portions of the <file title>. The default is the entire file.

The UPDATE command is implicitly invoked after the RMERGE command is executed.

The RMERGE command performs the same function as the MERGE command, except where sequence numbers coincide; in that case, the <file title> version, rather than the work file version, takes precedence.

Examples

list
100 work file - line 1
200 work file - line 2
300 work file - line 3
400 work file - line 4
500 work file - line 5
#

list rmergefile
#FILE (USERID)RMERGEFILE ON PACKID
100 rmergefile - line 1
150 rmergefile - line 2
200 rmergefile - line 3
250 rmergefile - line 4
#

rmerge rmergefile
#UPDATING
#
list
100 rmergefile - line 1
150 rmergefile - line 2
200 rmergefile - line 3
250 rmergefile - line 4
300 work file - line 3
400 work file - line 4
500 work file - line 5
#