The Connect sample program
The Connect sample program allows you to explore the MQCONNX call and its options from a client. The sample connects to the queue manager using the MQCONNX call, inquires about the name of the queue manager using the MQINQ call, and displays it. Also, learn about running the amqscnxc sample.
Running the amqscnxc sample
amqscnxc [-x ConnName [-c SvrconnChannelName]] [-u User] [QMgrName]
- ConnName
- The TCP/IP connection name of the server queue manager
If you do not specify the TCP/IP connection name, MQCONNX is issued with the ClientConnPtr set to NULL.
- SvrconnChannelName
- The name of the server connection channel
If you specify the TCP/IP connection name but not the server connection channel (the reverse is not allowed), the sample uses the name SYSTEM.DEF.SVRCONN.
- User
- The user name to be used for connection authentication
If you specify this the program will prompt for a password to accompany that user ID.
- QMgrName
- The name of the target queue manager
If you do not specify the target queue manager, the sample connects to whichever queue manager is listening at the given TCP/IP connection name.
SYSTEM.DEF.SVRCONN/TCP/machine.site.company.com
.) You see output like this:
Sample AMQSCNXC start
Connecting to the default queue manager
with no client connection information specified.
Connection established to queue manager machine
Sample AMQSCNXC end
amqscnxc -x machine.site.company.com -c SYSTEM.ADMIN.SVRCONN
the default queue manager name is used and you see output
like this:
Sample AMQSCNXC start
Connecting to the default queue manager
using the server connection channel SYSTEM.ADMIN.SVRCONN
on connection name machine.site.company.com.
Connection established to queue manager MACHINE
Sample AMQSCNXC end
amqscnxc -x machine.site.company.com MACHINE
you see output like this:
Sample AMQSCNXC start
Connecting to queue manager MACHINE
using the server connection channel SYSTEM.DEF.SVRCONN
on connection name machine.site.company.com.
Connection established to queue manager MACHINE
Sample AMQSCNXC end