According to the docs is CATO a command that has to stand alone.
The CAOS Documentation wrote:
CATO (command) category (integer)
Change the target's category to the one specified. The default is -1 which means the category is based on classifier and the catalogue as described in CATI. See also CATX and CATA.
In case your TARG is still the agent whose category you wanna check, you can use CATA instead.
The CAOS Documentation wrote:
CATA (integer)
Returns the target's category. This either depends on its classifier as described in CATI, or is its own individual override set with CATO.