WORKAREA( )
Returns a number representing the currently selected work area.
Syntax
WORKAREA( )
Description
The WORKAREA( ) function returns the number of the currently selected work area. Use WORKAREA( ) in a program to save the current work area number and then later restore that work area using the SELECT command.
Using the work area name returned by ALIAS( ) is generally preferred, but WORKAREA( ) will work better if there’s a possibility that no table is in use in the current work area.
OODML
There is no concept of the "current" Query object. Use your usual object management techniques to manage Query objects.