Description

Executes a request on a queue opened with the CreateQueue function.

Syntax

Error = CreateRequest(Request, Queue, Script, Arg1, Arg2, ...)

Parameters

The CreateRequest function has the following parameters.

ParameterDescription
RequestHandle for the request. Pass null. CreateRequest will return a request handle.
QueueHandle obtained from a call to CreateQueue().
ScriptCommand to be executed.
Arg1, Arg2, ...Arguments to the request.

Note: See the client program example for coding an entire request/response message loop. See CallFunction() and CallSubroutine() for a simpler approach.

See also

CreateQueue()CallFunction()CallSubroutine()

Example

// 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
  • No labels