Set default input/output streams of a model.
procedure setdefstream(mo:Model, wmd:integer, fname:string)
procedure setdefstream(mo:Model, input:string, output:string, error:string)
procedure setdefstream(mi:Mosel, wmd:integer, fname:string)
procedure setdefstream(mi:Mosel, input:string, output:string, error:string)
A Model
A Mosel instance
Stream to set. Possible values:
Default input stream
Default output stream
Default error stream
Use line buffering
Extended file name to be used for the stream.
Extended file name to be used for the input stream.
Extended file name to be used for the output stream.
Extended file name to be used for the error stream.
Further information
1. This function sets default IO streams to be used by a model. Model streams can be changed only when the model is not running. Each stream is associated to an extended file name (i.e. IO drivers can be used). For output streams, F_LINBUF may be specified (e.g.F_WRITE+F_LINBUF) in order to enable line buffering for the corresponding stream (the error stream is always open using line buffering).
2. For input and output streams, the filename is stored and streams are actually open when execution of the model starts: in case of an invalid file name, the error is not reported by this function. The error stream is immediately opened so in the case of an invalid file name it is detected by this function.
3. Using an empty string as the file name implies resetting to the original default stream.
4. When applied to a Mosel instance, this routine sets the default streams for this instance. These streams can only be changed if the instance has not yet loaded any model.
5. When using this routine on a separate Mosel instance or on a model loaded on 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).

If you have any comments or suggestions about these pages, please send mail to

© Copyright 2001-2013 Fair Isaac Corporation. All rights reserved.