Setting the MQSC command prompt

You can set the MQSC command prompt to a prompt of your choice by using the MQPROMPT environment variable.

Procedure

Set the MQPROMPT environment variable to the prompt of your choice.
The prompt is inserted both when the runmqsc console is run interactively, and when input is redirected into runmqsc from a file or from the standard input device (stdin).

You can include plain text in the command prompt, and you can also insert environment variables by using the +VARNAME+ notation in the same manner as IBM® MQ service object definitions. For more information, see Defining a service object.

For example, to set the prompt to MQSC, enter one of the following commands:

  • [Windows]
    set MQPROMPT="MQSC"
  • [UNIX][Linux]
    export MQPROMPT="MQSC"

Example

The following example shows setting the MQPROMPT variable on an AIX® system. The prompt is set to display a username, the queue manager name, and the IBM MQ host name. These values are taken from other environment variables that are set on the system:
sh> export MQPROMPT="+USER+ @ +QMNAME+ @ +MQ_HOST_NAME+> "
sh> runmqsc MY.QMGR
5724-H72 (C) Copyright IBM Corp. 1994, 2024.
Starting MQSC for queue manager MY.QMGR.
myuser @ MYQMGR @ aix1> DISPLAY QMSTATUS