Using a Qshell interactive session

The Start QSH (STRQSH) command, also known as QSH, is a CL (control language) command that either starts a Qshell interactive session or runs a Qshell command.

If running in an interactive job with no parameters, STRQSH starts an interactive Qshell session. If a Qshell session is not already active in the job, then the following events occur:

  1. A new Qshell session is started and a terminal window is displayed.
  2. qsh runs the commands from the file /etc/profile if it exists.
  3. qsh runs the commands from the file .profile in the user's home directory if it exists.
  4. qsh runs the commands from the file specified by the expansion of the ENV variable if it exists.

If a Qshell session is already active in an interactive job, you are reconnected to the existing session.

From the terminal window, you can enter Qshell commands and view output from the commands. The terminal window has two parts:

  • an input line for entering commands
  • an output area that contains an echo of the commands you entered and any output generated by the commands

You can use these function keys:

Function key Description
F3 (Exit) Close the terminal window and end the Qshell session.
F5 (Refresh) Refresh the output area.
F6 (Print) Print the output area to a spool file.
F7 (Up) Roll output area up one page. If a number is on the command line, the output area is rolled up by that number of lines.
F8 (Down) Roll output area down one page. If a number is on the command line, the output area is rolled down by that number of lines.
F9 (Retrieve) Retrieve a previous command. You can press this key multiple times to retrieve any previous command. For example, to retrieve the second to last command you entered, press this key two times. You can also select a specific command to be run again by placing the cursor on that command and pressing this key. When the interactive job is running in a double-byte CCSID, this key is not available.
F11 (Toggle line wrap) Toggle the line wrap/truncate mode in the output area. In line wrap mode, lines longer than the width of the terminal window are wrapped to the next line. In truncate mode, the portion of a line beyond the width of the terminal window is not shown.
F12 (Disconnect) Disconnect from the Qshell session. This key only closes the terminal window and does not end the Qshell session. You can redisplay the disconnected Qshell session by running STRQSH again.
F13 (Clear) Clear the output area.
F14 (Adjust command line length) Adjust the command line length to four lines. If a number is on the command line, the command line length is adjusted to that number of lines.
F17 (Top) Display top of output area.
F18 (Bottom) Display bottom of output area.
F19 (Left) Shift output area to the left. If a number is on the command line, the output area is shifted by that number of columns.
F20 (Right) Shift output area to the right. If a number is on the command line, the output area is shifted by that number of columns.
F21 (Command entry) Display a command entry window where you can enter CL commands.
SysReq 2 Interrupt the currently running command by sending the SIGINT signal to all child processes.