You can prevent the interactive execution of query requests by changing the Run Query (RUNQRY) command. To do so, change the command so that RUNQRY is not allowed from an interactive session.
First, use the Display Command (DSPCMD) command to display the RUNQRY command. RUNQRY, as shipped by IBM, is allowed during an interactive session.
Next, make a copy of the RUNQRY command in case the changes do not work correctly. Users (such as yourself) who are allowed to run interactive queries can access this copy of the command.
CRTDUPOBJ OBJ(RUNQRY) + FROMLIB(QSYS) OBJTYPE(*CMD) + TOLIB(SAVQSYS)
Using the Change System Library List (CHGSYSLIBL) command, place the library that contains the unchanged RUNQRY command below QSYS on the system portion of the library list. Change the RUNQRY command in QSYS to remove *INTERACT from the allowed environment. This prevents the command from being used in interactive sessions, which prohibits users from running interactive queries.
CHGCMD CMD(QSYS/RUNQRY) + ALLOW(*IREXX *BREXX *BPGM + *IPGM *EXEC *BATCH)
Record these changes in a source file. When you install a new release, the changes to commands are lost.
LATEST COMMENTS
MC Press Online