charTrans  ODL bridged functions

Chapter 2: Bridged Functions

setTblDir

Description

Specifies a new lookup location for translation table files (*.tbl) by allowing you to programmatically specify their directory location. Use this function within AIMs that use the produce() method to perform transaction production. It affects the table lookup location for the AIM from which it is called.

In the initial time that an AIM needs to access a .tbl file, the table’s contents are into memory where they remain for further use. Changing the table lookup location does not delete from memory any tables previously loaded tables. Therefore, if there is a .tbl file in the new table lookup location that has the same name as a .tbl file that was in the previous table lookup location, the new table’s contents are not loaded into memory and the previous table’s contents are still used.

If dynamic table loading is enabled, tables are reloaded if they have a more recent date and time stamp than the previously loaded tables. Use this function prior to first accessing tables.

Syntax

setTblDir(string newdir);
setTblDir("C:\the absolute path to the .tbl files");

Parameter

Description

newdir

Directory location of the *.tbl files you want to use. This string may contain a relative path or an absolute path. On Windows, an absolute path may include a drive with the directory path.

Return value

Integer.

Returns 1 for success, and 0 for failure.

Usage

string newdir;
newdir = "C:/Sybase/ImpactServer-5_4/tables";
setTblDir(newdir);




Copyright © 2005. Sybase Inc. All rights reserved. ODL bridged functions

View this book as PDF