Writing to a file

Simon Lord (simonl@cae.ca)
Thu, 13 Feb 1997 22:04:08 -0500

I'm having some trouble writing text to a file. I've been able to read
in files, edit them etc but when it comes to writing these changes back
into the file it just doesn't seam to want to go. I get the error "file
not open", but as you can see from the exact script below I seem to be
following the rules. It also says "Bad Token: matl.db" ??????

I've tried writing fields, single words and variables like the one shown
below to a file without success.

>open file "matl.db" for read
>read from file "matl.db" until eof -- I put this in as a sign of desperation, I needed to kow if it was reading it, which it was.
>write "GLOBAL " & item 2 of line x of cd fld "shellfield" & tabForm & ": MATL { 1 }" to file "matl.db"
>close file "matl.db"

Any help is much appreciated.

-- 
[---------------------------] Simon Lord
[Important letters that.....] Database Engineer, CAE Electronics
[contain no errors will.....] tel: (514) 341-2000 x3861
[develop errors in the mail.] fax: (514) 340-5496
[---------------------------] email: simonl@cae.ca