Previous Topic: PAUSE()Next Topic: PULL()


PUBSTACK()

This function declares one or more stacks public or to establish the default stack for the current IMOD or for other requesting IMODs.

Syntax

result = PUBSTACK({DEFAULT},[n,[n,..[n]])
                  {PRIV}
                  {READ}
                  {OREAD}
                  {RESET}
                  {PUB}
                  {WRITE}
                  {OWRITE}
                  {QUEUE}
                  {OQUEUE}

Parameters

result

Null string, if the function is successful; otherwise, error text is returned.

DEFAULT

Designates the specified stack (argument 2) as the default stack. Specify only one value for n.

RESET

Resets all stacks to private status. No stack numbers are permitted.

PRIV

Sets all specified stacks as private. You can specify up to 19 stacks per function call.

PUB

Sets all specified stacks to public status with READ, WRITE, and QUEUE status. You can specify up to 19 stacks per one function call.

READ

Adds READ status to the specified stacks. External IMODs can read such stacks non-destructively using TUG().

WRITE

Adds WRITE status to the specified stacks. External IMODs can write to the stacks. If the stack also has READ status, a record can be read destructively using PULL().

QUEUE

Adds QUEUE status to the specified stacks. QUEUE is a subset of WRITE status. A stack with QUEUE status, but not WRITE status, can have records queued to it by external IMODs using QUEUE().

OREAD

Cancels the previous status of the specified stacks and sets the status to READ only.

OWRITE

Cancels the previous status of the specified stacks and sets the status to WRITE only.

OQUEUE

Cancels the previous status of the specified stacks and sets the status to QUEUE only.

n

Stack number. This argument can be repeated for a total of 19 specifications per function call, except for the RESET operation. The RESET operation permits no other arguments, and the DEFAULT operation, which requires only one specification of n.

Return Codes

101 - 120

ARG n MISSING OR INVALID

121

NO STACKS SPECIFIED

122

EXCESS ARGUMENTS

Example

x = pubstack('RESET')         /* Reset all stacks to original conditions */
x = pubstack('DEFAULT',2)     /* Set stack 2 to default status */
x = pubstack('QUEUE',1,2,3)   /* Allow queuing to stacks 1, 2 & 3 */
x = pubstack('OREAD',3)       /* Reset stack 3 to READ ONLY status */

Usage Note

By default, all stacks are private.