Initializing help system before first use

openpipe

Purpose
Start an external process for bidirectional communication.
Synopsis
procedure openpipe(cmd:string|text)
Argument
cmd 
The command to be executed in the separate process
Example
The following example uses an external program sort (we assume it writes a sorted copy of what it reads) to display a sorted list of the content of set ToSort:
openpipe("sort")
forall(i in ToSort)
 writeln(i)
fclose(F_OUTPUT)

while(not iseof) do
 readln(l)
 writeln(l)
end-do
fclose(F_INPUT)
Further information
1. Pipes required by this procedure are created using the pipe driver of this module (see Section Driver pipe). As a consequence, the string provided as argument must be suitable for the driver ( i.e. a program name followed by its options separated by spaces).
2. This procedure opens both an input and output streams that must be closed explicitly using fclose. Note that the output stream must be closed first otherwise the program may lock up.
3. When Mosel is running in restricted mode (see Section mosel command: restricted mode), this procedure behaves like the system procedure.
4. In case of failure the procedure raises an IO error.
Module

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