Purpose
Get the file name of an embedded data block
.
Synopsis
function datablock(src:string, prefix:string):string
function datablock(src:string):string
Arguments
src
|
Name of the file to be embedded
|
prefix
|
Prefix to be used for accessing the data block (default:
"zlib.deflate:")
|
Return value
A file name pointing to the data block
Example
In the following code extract the bim file for
submod.mos is generated during the compilation of the current (master) model and is included in the resulting bim file for this model. At execution time the master model will therefore not require any additional file for this submodel:
load(submod,datablock("mmsystem.pipe:mosel comp -o - submod.mos"))
run(submod)
waitforend(submod)
Note that the output of the compilation for the file
submod.mos is redirected via the 'pipe' onto the master model while this model itself is being compiled.
Further information
1. This function makes it possible to embed in a bim file any data files that are available during the compilation of the model source but cannot be accessed at execution time. The files specified by this routine are made available as memory blocks (see Section
File names and input/output drivers) during the execution of the model.
2. The file specified by the
src argument is loaded into memory and saved in the resulting bim file during the compilation of the source model. At execution time this function call results in a file name pointing to a memory location storing the previously saved data.
3. The file name
src is handled in the same way as for source file inclusion (see Section
Source file inclusion), in particular the same rules apply regarding the file location and the expansion of environment variables.
4. The
prefix argument can be used to select a driver for processing the file. With its default value (
"zlib.deflate:") the file is compressed before being stored in the bim file, the decompression occurs when the file is accessed during execution (
i.e. the file name returned by the function begins with the string
"zlib.deflate:"). To keep the file in its original form use an empty string as the prefix (
i.e.
"").
5. When several data blocks with the same name and prefix are used in a model source the corresponding file is loaded and stored only once.
6. If the file to store is empty (or if its name is an empty string) the function call is replaced by the constant
"null:" and no memory block is created.
© 2001-2022 Fair Isaac Corporation. All rights reserved. This documentation is the
property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not
convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except
solely for internal evaluation purposes to determine whether to purchase a license to the software
described in this documentation, or as otherwise set forth in a written software license agreement
between you and FICO (or a FICO affiliate). Use of this documentation and the software described in
it must conform strictly to the foregoing permitted uses, and no other use is permitted.