int tsmWriteDatabase ( TsmDatabase *database, char *location ) Writes a dataset database file
Writes a dataset database file.This function will take a TsmDatabase and write this out to a dataset database file. If a location URL is specified, then this is used to specify where the file is to be saved. N.B. this does not change the default URL (the location field) associated with the database.
If the location URL is NULL or "", then the database->location field will be used as the location of the database file. This field is automatically filled in by tsmReadDatabase(), so if you want to overwrite a database that you just read, then you can use location=NULL.
The format used for the dataset database file is described at: http://www.ai.sri.com/~magic/tsmApi/dataset-db.html