Initializing help system before first use

XPRDconnect

XPRDconnect


Purpose
Create a new Mosel instance.
Synopsis
XPRDmosel XPRDconnect(XPRDcontext ctx, const char *cnstr, XPRDfct_open fmgr, void *fctx, char *errmsg, int msglen);
Arguments
ctx 
XPRD context
cnstr 
Connection string
fmgr 
File manager routine (can be NULL)
fctx 
Data pointer to be passed to the fmgr routine
errmsg 
Buffer to return error messages
msglen 
Size of errmsg
Return value
A Mosel instance or NULL in case of failure.
Example
In the following example 4 Mosel instances are started: m1 is started in a separate process on the same host; m2 is launched using the xprmsrv server running on host "myserver"; m3 is executed using the ssh command on host "secure", and for m4, the xprmsrv server running on host "mybox" is requested to use the context "xpress" with password "mypass":
m1=XPRDconnect(xdctx,"",NULL,NULL,buf1,256);
m2=XPRDconnect(xdctx,"myserver",NULL,NULL,buf2,256);
m3=XPRDconnect(xdctx,"rcmd:ssh secure mosel -r",NULL,NULL,buf3,256);
m4=XPRDconnect(xdctx,"xsrv:mybox/xpress/mypass",NULL,NULL,buf4,256);
Further information
1. An empty connection string "" is equivalent to "rcmd:" (instance started on the same machine in a separate process). Any other string not starting by either "rcmd:", "xsrv:" or "xssh:" is interpreted as a host name that is prefixed by "xsrv:" (instance started on the specified host using the xprmsrv protocol). Refer to the Mosel Language Reference Manual, section on module mmjobs for further detail on how to use these drivers.
2. In case of failure, the parameter errmsg receives the error message reported by the driver used to perform the connection.
3. The optional file manager fmgr allows to control file access from the created remote instance: all requests for opening files are passed to this routine. Depending on the return value of the function, the request is rejected, processed by a user provided function or handled by the default file manager ( i.e. direct access to physical files). Refer to Section File managers for further explanation.
4. Function XPRDstart is automatically called after a successful connection in order to start (if necessary) the connection manager.
5. Default streams of the newly created instance are initialised with "null:" for the input ( i.e. stream disabled); "rmt:sysfd:1" for output and "rmt:sysfd:2" for errors. These settings can be changed using XPRDsetdefstream.
Related topics

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