Initializing help system before first use

Output from the submodel

By default, submodels use the same location for their output as their parent model. This implies that, when several (sub)models are run in parallel their output, for example on screen, is likely to mix up. The best way to handle this situation is to redirect the output from each model to a separate file.

Output may be redirected directly within the submodel with statements like the following added to the model before any output is printed:

 fopen("testout.txt", F_OUTPUT+F_APPEND) ! Output to file (in append mode)
 fopen("tee:testout.txt&", F_OUTPUT)     ! Output to file and on screen
 fopen("null:", F_OUTPUT)                ! Disable all output 

where the first line redirects the output to the file testout.txt, the second statement maintains the output on screen while writing to the file at the same time, and the third line makes the model entirely silent. The output file is closed by adding the statement fclose(F_OUTPUT) after the printing statements in the model.

The same can be achieved from the master model by adding output redirection before the run statement for the corresponding submodel ('modSub'), such as:

 setdefstream(modSub, F_OUTPUT, "testout.txt") ! Output to file
 setdefstream(modSub, F_OUTPUT, "tee:testout.txt&")
                                               ! Output to file and on screen
 setdefstream(modSub, F_OUTPUT, "null:")       ! Disable all output 

The output redirection for a submodel may be terminated by resetting its output stream to the default output:

 setdefstream(modSub, F_OUTPUT, "")

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