fameStart
is called
to initialize the HLI (Host Language Interface) and open a work
database. After accomplishing that, fameStart
checks to see if
a function named fameLocalInit
exists. If so, it is called
with no arguments immediately after opening the work database.At the Federal Reserve Board, we have some code in .pc files that we always load when running Fame. To do this, we define: fameLocalInit <- function(){ fameCommand('load file("/opt/fame/frb/pc/lib.pc")', silent = T) fameCommand('load file("/opt/fame/frb/pc/syslib.pc")', silent = T) }
getfame
, putfame
, fameWhats
and
fameWildlist
all take a string db
argument to specify
the database to open. The string is fed to the internal function
getFamePath
to find the database. getFamePath(dbString)
first checks to see if its argument is already the path to an existing
file. If so, it is returned. If not, and a local function
called fameLocalPath
exists, dbString
is replaced by
fameLocalPath(dbString)
and the check is made again. If the
result is a valid path to an existing file, it is returned.
Otherwise, getFamePath(dbString)
returns NULL
.
At the Federal Reserve Board, some of our FAME databases are "registered", i.e.,
there is a shell script maintained by the database administration
staff that takes a short name (like "us" or "intl") and returns a path
name. Our local fameLocalPath
calls that script and returns
the full path name to the database, or the original string if the
database was not found.