TCP/IP client
- Define a server connection channel using the following procedures:
- For i5/OS:
- Start your queue manager by using the STRMQM command.
- Define a sample channel called JAVA.CHANNEL by issuing the following command:
CRTMQMCHL CHLNAME(JAVA.CHANNEL) CHLTYPE(*SVRCN) MQMNAME(QMGRNAME) MCAUSERID(SOMEUSERID) TEXT('Sample channel for WebSphere MQ classes for Java')where QMGRNAME is the name of your queue manager, and SOMEUSERID is an i5/OS user ID with appropriate authority to the WebSphere MQ resources.
- For z/OS:
You must have the Client attachment feature installed on your target queue manager in order to connect using TCP/IP.
- Start your queue manager by using the START QMGR command.
- Define a sample channel called JAVA.CHANNEL by issuing the following command:
DEF CHL('JAVA.CHANNEL') CHLTYPE(SVRCONN) TRPTYPE(TCP) DESCR('Sample channel for WebSphere MQ classes for Java')
- For the other platforms:
- Start your queue manager by using the strmqm command.
- Type the following command to start the runmqsc program:
runmqsc [QMNAME]- Define a sample channel called JAVA.CHANNEL by issuing the following command:
DEF CHL('JAVA.CHANNEL') CHLTYPE(SVRCONN) TRPTYPE(TCP) MCAUSER(' ') + DESCR('Sample channel for WebSphere MQ classes for Java')
- Start a listener program with the following commands:
- For UNIX and Windows systems:
- Issue the command:
runmqlsr -t tcp [-m QMNAME] -p 1414If you use the default queue manager, we can omit the -m option.
- For i5/OS:
- Issue the command:
STRMQMLSR MQMNAME(QMGRNAME)where QMGRNAME is the name of your queue manager.- For z/OS:
- Ensure your channel initiator is started. If not, start it by issuing the START CHINIT command.
- Start the listener by issuing the command START LISTENER TRPTYPE(TCP) PORT(1414)
uj10400_