Use the STACKINF() function to return and modify information about the current contents and status of a stack.
The STACKINF() function has this syntax:
Form 1:
value = STACKINF(return,[stack],[owner])
Form 2:
curvalue = STACKINF(MAXBYTE,[stack],[owner],[kbytes])
Form 3:
acctype = STACKINF(ACCESS,[stack],[owner])
The STACKINF() function takes these arguments:
Requested information (or error text).
Specify one of these values:
Returns the current NEWSTACK number. This is the number of times that the NEWSTACK
command has been issued against this stack less the number of times the DELSTACK command was issued.
Returns the current buffer number. This is the number of times that the MAKEBUF command has been issued against this stack less the number of times the DROPBUF command was issued.
Returns the number of stack records in the current buffer, as determined by the MAKEBUF command.
Returns the total elements on the stack. This option functions exactly like the QUEUED() function.
Returns a string consisting of all currently existing stack numbers. The numbers are blank-delimited, and are listed in ascending order.
Number of the stack to be referenced.
Default: If stack is omitted and a local stack is referenced, the current stack (as set by SWAPSTAK()). If stack is omitted and an external stack is referenced, the value set by the owning IMOD task using the PUBSTACK(DEFAULT) function.
Stack's current size limit in k-bytes. If kbytes is omitted, curvalue returns the current setting. If kbytes is specified, curvalue equals kbytes. To convert curvalue to bytes, multiply by 1024.
Stack's current size limit in k-bytes. If kbytes is omitted, curvalue returns the current setting. If kbytes is specified, curvalue equals kbytes. To convert curvalue to bytes, multiply by 1024.
Returns or sets the maximum amount of data that may be contained in the stack. Including kbytes sets the amount.
Maximum storage that may be occupied by the stack. This value is specified in k-bytes and is multiplied by 1024 to obtain the actual storage limit.
One of these values is returned:
The stack is private.
The stack is fully accessible for external operations.
The stack can have data queued to it externally. This is a subset of WRITE.
The stack can be read externally.
The stack can be read from and queued to by external functions.
The stack can be written to externally. This also implies QUEUE.
Returns the access status, as set by PUBSTACK().
The STACKINF() function produces these return codes:
101 - 104 ARG n MISSING OR INVALID
125 SPECIFIED IMOD NOT FOUND
126 STACK NOT SPECIFIED AND NO DEFAULT
127 REQUESTED STACK DOES NOT EXIST
Example
recs = stackinf('queued') /* Determine total stack
records */
status = stackinf('access',,123) /* Determine public status of
default stack owned by IMOD
123 */
list = stackinf('stacks') /* Obtain list of all active
stacks */
list = stackinf('stacks',,123) /* Obtain list of all active
stacks belonging to IMOD
123 */
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |