Set the MQSC command prompt

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


Procedure

Set the MQPROMPT environment variable to the prompt of our choice. We can include plain text in the command prompt, and we 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:

  • set MQPROMPT="MQSC"
  • 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, 2020.
Starting MQSC for queue manager MY.QMGR.
myuser @ MYQMGR @ aix1> DISPLAY QMSTATUS
Parent topic: Running MQSC commands interactively