This function starts the execution of another IMOD task. Spawned IMODs run concurrently with the spawning IMOD task.
Important! Do not create a situation where an IMOD task spawns itself. An unlimited number of IMOD tasks can be created, swamping the ISERVE address space.
imod_id = (SPAWN,imodname,[{COPYQ|NEWQ|PASSQ}],[args])
Parameters
The SPAWN() function takes these arguments:
ID assigned to the new IMOD task. This IMOD ID is a unique number that can be used to reference an executing IMOD task. It is used to access the task stacks for the IMOD externally and as an argument in the command CANCEL IMOD.
Name of the IMOD to be executed. This IMOD must be marked as CALLABLE by including the #CALLABLE compiler directive in the source code for the IMOD.
Starts with a copy of the current stack. If NEWSTACK has been used, only the current stack is copied.
Starts with a new, empty stack.
Transfers the existing stack to the new IMOD. If NEWSTACK has been used, only the current stack is transferred.
A text string, to be passed to the spawned task as an initial argument string.
Default: NEWQ
INCORRECT CALL TO ROUTINE (NOT CALLABLE)
INCORRECT CALL TO ROUTINE (NOT ACTIVE)
INCORRECT CALL TO ROUTINE (NOT ALLOWED)
ARG n MISSING OR INVALID
REQUESTED IMOD NOT FOUND
Example
queue 'Some data to work on' /* Get data ready */ spawn(async_work,'PASSQ') == '00000016' /* Returns IMOD internal name */
Copyright © 2014 CA Technologies.
All rights reserved.
|
|