If a function by the same name is already exported by pjs.requireServiceProgram() or pjs.requireModule() API, the call to pjs.defineProc() will have no effect, and the exported functions will be utilized instead of the external procedure specified by pjs.defineProc().
- Configuration - an object with the following properties:
- srvpgm (optional) - A String containing the name of the service program to use. The service program name can be quailed with a library, otherwise the library list will be used to resolve the service program. If the service program is not specified, the API will attempt to resolve the procedure automatically.
- extProc (optional) - A string containing the name of the external procedure in the service program. If not specified, the procedure name is assumed to be the same as the Function name.
- parms - An array of parameter definitions. Each parameter definition is a configuration object of the format used by pjs.define(). Optionally, you can attach a name property to the configuration objects to identify parameter names; however, the name is for informational purposes only and is not used internally by the API. Each configuration object may also contain a byRef true or false property, which specifies whether the parameter is passed by reference. The default value for byRef is false. pjs.refParm() must be used when calling the function and passing parameters by reference.
- result (optional) - A configuration object of the format used by pjs.define(), which defines the procedure's return value. This property should only be specified if the procedure has a return value.
This API requires the Profound.js Connector module.