Blog Archive

Suppress Java Shell Display in AS400 RUNJVA and JAVA commands

You may have seen the screen flicker or display some scripts when you call a JAVA program in iSeries. These are logs that are written to the console. Now if you would like to hide that then you have to set logging to NONE.
There are two ways to do it
  • Set the OUTPUT option in the RUNJVA or JAVA command to *NONE
  • Set the environment variable QIBM_QSH_CMD_OUTPUT to NONE

The ADDENVVAR, CHGENVVAR, RMVENVVAR and WRKENVVAR commands can be used to manipulate the QSHELL environment. The environment parameters can be set for the entire system and for the job. In most cases, you will not want to change the environment parameter at the system level, because it will affect all users of QSHELL on the system.

Set the job environment to log messages to the terminal
ADDENVVAR ENVVAR(QIBM_QSH_CMD_OUTPUT) VALUE(STDOUT) LEVEL(*JOB)

Set the system environment to not log messages.
ADDENVVAR ENVVAR(QIBM_QSH_CMD_OUTPUT) VALUE(NONE) LEVEL(*SYS)

Set the job environment to log messages to the a file in the IFS. mydirectory must exist in the IFS.
ADDENVVAR ENVVAR(QIBM_QSH_CMD_OUTPUT)VALUE('FILE=/mydirectory/QSHELL_output') LEVEL(*JOB)