Edward Givens writes
Hello everyone,
I have 2 files:
Lmar3 $B"* (B rec length = 37, ASCII, # of records = 6550
Lmar4 $B"* (B rec length = 37, ASCII, # of records = 485
The resulting file (LBANK11) should be 7035 records and keep rest of
attributes (REC LENGTH, ascii, etc)
How do I merge these files together, I have already used the gather command
within QUAD but I know there is a Merge subsystem that can do this faster
and more efficiently.
------------------------------------------------------
Right there is. MERGE.PUB.SYS is a system similar to SORT.PUB.SYS. It will merge pre-sorted files together based on the key(s) that are provided. You can use the merge program, or call the merge intrinsics or in COBOL use the MERGE verb.
Example:
:PRINT IN1
AA12345
CCXXXXX
FFYYYYY
:PRINT IN2
BBAAAAA
EE88888
:MERGE
HP31900A.01.01 MERGE/V WED, MAR 26, 2003, 8:38 AM
(C) HEWLETT-PACKARD CO. 1987
>INPUT IN1,IN2
>OUTPUT IN3
>KEY 1,2
>E
STATISTICS
NUMBER OF INPUT FILES = 2
NUMBER OF RECORDS = 5
SPACE AVAILABLE (IN WORDS) = 26,784
NUMBER OF COMPARES = 4
CPU TIME (MINUTES) = .00
ELAPSED TIME (MINUTES) = .00
RECORD SIZE (IN BYTES) = 72
:PRINT IN3
AA12345
BBAAAAA
CCXXXXX
EE88888
FFYYYYY
Mike Berkowitz
Guess? Inc.
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|