The OLAPOPERATE Procedure

Canceling a Query Result Set

You can cancel (close) an OLAP query result set with the CANCEL QUERY statement.
CANCEL QUERY id | _ALL_ [INACTIVE=seconds];
The ID is the unique result set identifier returned from the LIST QUERIES statement. Canceling a query stops the query processing and closes the result set on the server. If the _ALL_ keyword is specified, then all open query result sets are closed. If the INACTIVE option is specified, then only queries inactive for the specified duration are canceled.