The user was not permitted to issue the online transaction DQRY.
For CA Top Secret, issue the command:
TSS PER(acid) OTRAN(DQRY)
Where: acid is the USERID or PROFILE acid
The PERMIT statement above only applies to CA TopSecret security. CA ACF2 and IBM RACF have other methods for adding permissions.