Use the SHOVE() function to insert records into any stack belonging to any IMOD. Inserted records can be placed at any position within the stack.
SHOVE() can specify a stack external to an IMOD only when the target stack has been declared public for writing.
The SHOVE() function has this syntax:
SHOVE([record],[recnum],[stack],[owner],,[postoption])
The SHOVE() function takes these arguments:
Record to be inserted into the stack.
Default: A zero-length record is added.
Record number that is to be assigned to the inserted record. Existing records of recnum or higher have their record numbers increased by one. The lowest record number is 1. Record 1 is the first record fetched by PULL. If the record number exceeds the total records currently on the stack, a QUEUE is performed.
Number of the stack to be referenced.
Default: If a local stack is referenced, the current stack (as set by the SWAPSTAK() function); otherwise, the value is set by the owning IMOD task using the PUBSTACK(DEFAULT) function.
IMOD ID of the stack's owner (for external reference). This value can be obtained from the variable imod_id in the owning IMOD task. It is also the value returned by the SPAWN() function.
Default: Current IMOD task.
Wait option, which determines whether the owning IMOD waits for a record to appear on an external stack. Specify one of these values:
POST
Any outstanding wait is satisfied; the default.
NOPOST
An outstanding wait is not satisfied.
ONLYPOST
Any outstanding wait is satisfied, but a record is not placed on the stack.
Note: If you are placing several records onto an external stack, CA recommends that you specify NOPOST for all but the final record. IMODs are time-sliced, and if the POST operation is performed before the final record is shoved on the stack, the IMOD task owning the stack could be dispatched to process before the final SHOVE is completed.
The SHOVE() function produces these return codes:
ARG n INVALID
STACK NOT SPECIFIED AND NO DEFAULT
SPECIFIED STACK DOES NOT EXIST
SPECIFIED IMOD NOT FOUND
STACK WRITE FAILED
REQUESTED STACK DOES NOT EXIST
SPECIFIED IMOD/STACK NOT AUTHORIZED
Example
x = shove(rec,5) /* A record is inserted into the
current stack */
x = shove(rec,5,2) /* A record is inserted into local
stack 2 */
x = shove(rec,5,,453,,'post') /* A record is inserted into IMOD
453's default stack. Any
outstanding wait is marked
complete. */
| Copyright © 2012 CA. All rights reserved. | Tell Technical Publications how we can improve this information |