Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!ames!elroy!usc!hacgate!ashtate!dbase!awd From: awd@dbase.UUCP (Alastair Dallas) Newsgroups: comp.databases Subject: Re: DBASEIV help needed Summary: Easy fix! Message-ID: <95@dbase.UUCP> Date: 10 Jun 89 20:24:40 GMT References: <8906071917.AA23075@cunixa.cc.columbia.edu> Organization: Ashton Tate Devlopment Center Glendale, Calif. Lines: 24 In article <8906071917.AA23075@cunixa.cc.columbia.edu>, cmm1@CUNIXA.CC.COLUMBIA.EDU (Christopher M Mauritz) writes: > I have a small problem with DBaseIV. In my program, I create a textfile > using the SET ALTERNATE command. If I run the program more than once, I'd > like the new text file to append itself to the end of the old one. Is this > possible? > > Chris Mauritz > cmm1@cunixa.cc.columbia.edu The ADDITIVE keyword added to the SET ALTERNATE command does exactly what you want. The following syntax: a = IIF(FILE("Foo.txt"), "ADDITIVE", "") SET ALTERNATE TO "Foo.txt" &a will add to, rather than overwrite, the existing file "Foo". If "Foo" doesn't exist, it will be created. The only reason for the added complexity is if you want the program to work identically whether the file exists or it doesn't. If all you want is to add to a file which you know exists, leave off the IIF line and replace &a with ADDITIVE. I wish all the dBASE IV problems people had were so easy! Hope it helps. /alastair/