Executes a request on a queue opened with the CreateQueue function.
Error = CreateRequest(Request, Queue, Script, Arg1, Arg2, …)
The CreateRequest function has the following parameters.
Parameter | Description | |
---|---|---|
Request | Handle for the request. Pass null. CreateRequest will return a request handle. | |
Queue | Handle obtained from a call to CreateQueue(). | |
Script | Command to be executed. | |
Arg1, Arg2, … | Arguments to the request. |
See the client program example for coding an entire request/response message loop. See CallFunction() and CallSubroutine() for a simpler approach.
// Execute a request on a queue. Error = CreateEngine(Engine,"\\DEVSERVER","SYSPROG", CREATE_ENGINE_OPEN_ALWAYS$,1) // error checking for CreateEngine() Error = CreateQueue(Queue, Engine, "", "SYSPROG", "SYSPROG") // error checking for CreateQueue() Error = CreateRequest(Request, Queue, "RUN GET_APP_INFO 'SYSPROG'") if (Error) then CloseQueue(Queue) CloseEngine(Engine) return end