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