Use YANK() to remove any record from any stack belonging to any IMOD.
The YANK() function has this syntax:
record = YANK(recnum,[stack],[owner],[cntl])
The YANK() function takes these arguments:
|
record |
Returned record or error text. |
|
recnum |
Record number to be removed from the stack. |
|
stack |
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. |
|
owner |
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. The default is the current IMOD task. |
|
cntl |
Name of a variable to receive the control information stored with the record. The default is not to retrieve control information. |
The YANK() function produces these return codes:
101 - 105 ARG n INVALID
122 STACK NOT SPECIFIED AND NO DEFAULT
123 RECORD NOT FOUND
125 SPECIFIED IMOD NOT FOUND
126 STACK WRITE FAILED
127 REQUESTED STACK DOES NOT EXIST
128 SPECIFIED IMOD/STACK NOT AUTHORIZED
Example
rec = yank(2) /* Record number 2 is removed from the
current stack */
rec = yank(2,5) /* Record number 2 is removed from
local stack 5 */
rec = yank(2,,453,'data') /* Record 2 is removed from IMOD 453's
information is stored in the
variable data. */
YANK() can specify a stack external to an IMOD only when the target stack has been declared public for both reading and writing.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |