HP3000-L Archives

June 1999, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Barrett, Steven P." <[log in to unmask]>
Reply To:
Barrett, Steven P.
Date:
Tue, 15 Jun 1999 11:37:51 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (40 lines)
And, a CI solution:

        file filea,old;dev=disc
        file fileb,old;dev=disc
        build filec;dev=disc;rec=-125,,f,ascii
        file filec,old;acc=append
        setvar reccount 0
        while (finfo('*filea','EOF') > !reccount) &
        OR (finfo('*fileb','EOF') > !reccount)
             setvar reca ""
             setvar recb ""
             continue
             fcopy from=*filea;to=scratch;subset=!reccount,1 >$NULL
             continue
             input reca <scratch
             continue
             fcopy from=*fileb;to=scratch;subset=!reccount,1 >$NULL
             continue
             input recb <scratch
             setvar reca rtrim("!reca")+rtrim("!recb")
             echo !reca >>*filec
             setvar reccount !reccount+1
        endwhile

If you need to retain the original file record widths, remove the "rtrim"
functions and pad the 'setvar reca ""' and 'setvar recb ""' statements with
spaces equal to the "filea" and "fileb" record sizes.

Steven P. Barrett             |
Network Manager               |  Voice:  1-703-222-3132
Fairfax County Public Library |    FAX:  1-703-222-3135
Technical Operations Center   | e-mail:  [log in to unmask]

--- The opinions expressed here are mine alone. ---

"Life is dear to every living thing, the worm that crawls upon
     the ground will struggle for it."
(from Solomon Northup's - Twelve Years a Slave,
     at http://metalab.unc.edu/docsouth/northup/northup.html)

ATOM RSS1 RSS2