HP3000-L Archives

August 1998, 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:
Tony Furnivall <[log in to unmask]>
Reply To:
Tony Furnivall <[log in to unmask]>
Date:
Tue, 18 Aug 1998 20:25:45 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (27 lines)
At 05:40 PM 8/18/98 -0600, you wrote:
>Within a command file, I need to merge two datafiles together into a third
>file.  Normally I would use FCOPY to merge the files but can't figure how to
>do that in a command file.  Thanks for any clever approaches.

I don't think it's particularly clever, but it works for me!

comment file1 and file2 are to be merged into file3
comment file 3 may or may not exist. Usual caveats about file structure, etc
comment matching across all three files
file3;acc=append
setjcw cierror=0
continue
listf file3
if  cierror=0 then
    comment file3 exists already
    fcopy from=file1;to=*file3
else
    comment file3 does not exist, need to use ;NEW on theFCOPY commanbd
    fcopy from=file1;to=*file3;new
endif
fcopy from=file2;to=*file3


HTH
TOny

ATOM RSS1 RSS2