Appendix D. Preventing users from running Query for iSeries
queries interactively
The system administrator can restrict users from running queries interactively. When this restriction is
applied, users cannot:
v Use option 9 (Run) on the Work With Queries display.
v Press F5 (Report) to display the report on-screen.
v Use option 1 (Run interactively) on the Exit this Query display.
v Run the QRYRUN procedure interactively.
v Run the Run Query (RUNQRY) command interactively.
If a user attempts to run a query interactively, and is restricted from doing so, an error message appears.
A user cannot run a query interactively when:
v The authority for the RUNQRY command is changed so the user is no longer authorized to it. This may
affect the ability of the user to run in batch (see note below on allowing one or more users to have
different run capabilities).
v The RUNQRY command is changed to no longer support being run interactively.
To prevent a user from running a query interactively:
v Use the Change Command (CHGCMD) command to remove *INTERACT from the ALLOW (where
allowed to run) parameter. ALLOW(*PGM) is not allowed in RUNQRY.
v Change the authority for the RUNQRY command to state which users have authority to this command.
Note: To allow one or more users to have different run capabilities than what is specified for the
RUNQRY command in QSYS:
1. Create a duplicate object of the RUNQRY command and place it in a library other than
QSYS.
2. Make the needed changes to restrict the use of the RUNQRY command in QSYS.
3. Place the library containing the new RUNQRY command, that is, the version that allows
users to run interactively, ahead of QSYS in the library list of the users who need to run
queries interactively.
Note: If you add a new release of the operating system, you may need to redefine the RUNQRY
command parameters.
© Copyright IBM Corp. 2000, 2002 243