Initializing help system before first use

compile

Purpose
Compile a source model.
Synopsis
function compile(src:string|text):integer
function compile(opt:string|text, src:string|text):integer
function compile(opt:string|text, src:string|text, dst: string|text):integer
function compile(opt:string|text, src:string|text, dst: string|text, com:string|text, pass:string|text, pke:string|text, kls:string|text):integer
function compile(mi:Mosel, opt:string|text, src:string|text, dst: string|text):integer
function compile(mi:Mosel, opt:string|text, src:string|text, dst: string|text, com:string|text, pass:string|text, pke:string|text, kls:string|text):integer
Arguments
opt 
Compilation options (may be separated by spaces or '-' symbols):
"g" 
Include debugging information
"G" 
Include tracing information
"p" 
parse only: stop after the syntax analysis of the source file, do not compile (no file generated)
"bx=prefix" 
Package prefix list (can be quoted with single or double quotes)
"ix=prefix" 
Include source prefix (can be quoted with single or double quotes)
"S" 
Sign the bim file
"E" 
Encrypt the bim file
"F" 
The argument pass is a file name (not the password itself)
"V" 
Accept to load signed packages only if their signature can be verified
"T" 
Accept to load only signed packages with a valid signature
src 
Source file name
dst 
Destination file name
com 
Comment to store in the bim file
mi 
The Mosel instance to perform the compilation
pass 
Password or password file (for encryption with a password)
pke 
Private key file (for bim file signing)
kls 
File of public keys (for encryption with public keys)
Return value
Function executed successfully
Parsing phase has failed (syntax error or file access error)
Error in compilation phase (a semantic error has been detected)
Error writing the output file
License error (compiler not authorized)
Example
Compile the local file "src.mos" stored on the current directory using the instance inst1 and store the resulting BIM file on the current directory of this instance:
r:=compile(ins1,"","rmt:src.mos","dst.bim") 
Further information
1. This function compiles a given model source file into a binary model file (bim file) that is required as input to function load for executing the model.
2. If no destination file name is provided, the output file takes the same name as the source file with the extension .bim.
3. When sending a compilation request to a separate Mosel instance, it is important to keep in mind that the operation is performed in the environment of this instance (in particular its current working directory) and file names should be specified appropriately (the rmt: IO driver can be particularly helpful in this context). An IO error will be raised in case of network failure.
4. The argument kls is a list of public key files ( i.e. each line of the file is a key file name): when encrypting a file, the encryption is performed for each of the listed public keys such that the bim file can be decrypted by any of the corresponding private keys.
5. When prefixes provided via bx or ix are quoted with double quotes, backslashes are interpreted such that special characters can be included in the string. It is therefore required to double this symbol when it has to be included ( e.g. 'bx="C:\\mydir"').
6. If the option bx is not stated, the current value of the control parameter bimprefix will be used instead during the compilation for loading packages (See section Directive uses).
Related topics
load.
Module

© 2001-2025 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.