SetSubst(tbl_file, str_key, num_col, str_value);
tbl_file
str_key
num_col
str_value
Assigns str_value to the value column num_col of the specified substitution table entry. It does not affect the physical file stored on disk, only the representation of the table in the memory.The substitution table file is specified by tbl_file, and the substitution table entry is specified by str_key. If the entry does not exist, it will be created.In this example, the following substitution table (author.tbl) is used.
//!CodePage UTF8!//!multicolumn!agatha christie 1890alfred h 1899The following script modifies the substitution table entry alfred, and adds the substitution table entry astrid:SetSubst("../data/tables/author.tbl","alfred",0,"hitchcock");SetSubst("../data/tables/author.tbl","astrid",0,"lindgren");SetSubst("../data/tables/author.tbl","astrid",1,"1907");WriteSubst("../data/tables/author.tbl");After the script is executed, author.tbl is changed as follows:
//!CodePage UTF8!//!multicolumn!agatha christie 1890alfred hitchcock 1899astrid lindgren 1907
• A substitution table is kept in memory until the script function EraseSubst is called for that table.
• Try to use the AddSubst function instead of SetSubst when possible, as more than one job can be executed at the same time. If different jobs call SetSubst, they will overwrite each others’ modifications to the substitution table.
OpenText StreamServe 5.6 | Updated: 2013-03-01 |