You can clear the messages from STOQs by using the RQ command or the STOQ_RQ library procedure.
Using the RQ (Remove STOQ Entries) Command in MARC
The RQ command has the following forms:
|
Form |
Function |
|---|---|
|
RQ <queue name> |
Removes all messages from the STOQ with the specified queue name. |
|
RQ = |
Removes all messages from all STOQs currently in memory. |
The following are an example RQ command and the response to that command:
RQ MSGQA MSGQA REMOVED
Using the STOQ_RQ Library Procedure
The following are the ALGOL declarations for the STOQ_RQ library procedure:
LIBRARY EVASUPPORT (LIBACCESS = BYFUNCTION,
FUNCTIONNAME = “EVASUPPORT.”);
PROCEDURE STOQ_RQ(DATA_ARRAY);
EBCDIC ARRAY DATA_ARRAY[0];
LIBRARY EVASUPPORT;The parameter DATA_ARRAY serves the following two purposes:
-
The user program initializes this array with the STOQ name or an equal sign (=). The STOQ name must be six characters long, padded with blanks if necessary. Similarly, the equal sign must be left-justified and padded with five blanks.
-
The system returns the response to the STOQ_RQ action in this same array.
The response returned in DATA_ARRAY consists of one or more entries that have the following format:
|
Length |
Content |
|---|---|
|
6 bytes |
The STOQ name |
|
3 bytes |
The number of messages that were in the queue. This is a six-digit number stored in packed decimal form. |
|
3 bytes |
The number of user programs that are waiting on this STOQ. This is a six-digit number stored in packed decimal form. |
The final entry is followed by a null character (48”00”).

