星期二, 4月 17, 2018

DB2 APAR PI47282 needed when using JAVA SDK8 in WebSphere Application Server V8.5.5.9+

DB2 APAR PI47282 needed when using JAVA SDK8 in WebSphere Application Server V8.5.5.9+
http://www-01.ibm.com/support/docview.wss?uid=swg21982343

PI47282: NEW RELEASE OF THE IBM DB2 DRIVER FOR JDBC AND SQLJ (RELEASE 4.19) PROVIDING VARIOUS ENHANCEHMENT
http://www-01.ibm.com/support/docview.wss?uid=swg1PI47282

SqlException: unsupported encoding Cp037 for result set column
Unsupported ccsid, encoding, or locale: "Cp037". ERRORCODE=-4220, SQLSTATE=22021

WAS may get the following error:
Unsupported ccsid, encoding, or locale: "Cp037". ERRORCODE=-4220, SQLSTATE=22021


星期二, 3月 06, 2018

How do you define a MQ trigger monitor service?

How do you define a MQ trigger monitor service?
https://developer.ibm.com/answers/questions/397542/how-do-you-define-a-mq-trigger-monitor-service.html

The following MQSC command defines a trigger monitor service called INIT. It is used to trigger the start of an application to get a message from a queue. WMQ is installed in the default location of "C:\Program Files\Websphere MQ". The name of the initiation queue is "MY.INITQ".
You can add a description [DESCR] within single quotes if you want. 'tm_out' and 'tm_err' define the name of output an error date for this service respectively. These files can be deleted if you feel they have become to large. They will be recreated if needed. The definitions that begin and end with '+' are place holders.
Refer to DEFINE SERVICE for more information on defining a service.
Note: (a) Only customize items in BOLD ITALICS for your environment.
(b) You may customize the STDOUT and STDERR filename and path.
1 - Modify the command for your environment.
2 - Open a command prompt, type: RUNMQSC [Your_Queue_Manager_Name].
3 - Copy and Paste the modified command into the RUNMQSC window press .
DEFINE SERVICE ('INIT') +
DESCR(' ') +
STARTCMD('+MQ_INSTALL_PATH+bin64\runmqtrm') +
STARTARG('-m +QMNAME+ -q MY.INITQ') +
STOPCMD('+MQ_INSTALL_PATH+bin64\amqsstop') +
STOPARG('-m +QMNAME+ -p +MQ_SERVER_PID+') +
STDOUT('C:\Program Files\IBM\WebSphere MQ\errors\tm_out') +
STDERR('C:\Program Files\IBM\WebSphere MQ\errors\tm_err') +
CONTROL(QMGR) +
SERVTYPE(SERVER) +
REPLACE
4 - Type "END" and press .
NOTE: This information was originally in technote #1284004

technote #1284004
Basic process triggering using runmqtrm defined as a service in WebSphere MQ 7.5 and 8.0



What you can purchase with IBM MQ

What you can purchase with IBM MQ
https://www.ibm.com/support/knowledgecenter/SSFKSJ_9.0.0/com.ibm.mq.pro.doc/q126140_.htm

Multiplatforms
For IBM MQ for Multiplatforms, the product offering contains the following chargeable components that can be independently purchased:
5724-H72 IBM MQ
IBM MQ (Server)
[V9.0.4 Oct 2017]IBM MQ High Availability Replica (formerly IBM MQ Idle Standby)
IBM MQ Advanced
[V9.0.4 Oct 2017]IBM MQ Advanced High Availability Replica (formerly IBM MQ Advanced Idle Standby)
IBM MQ Advanced for Developers
For the following chargeable components, existing Subscription and Support can be renewed. No new entitlement can be purchased. See the Announcement Letter for more information.
  • IBM MQ Telemetry
  • Advanced Message Security
  • [V9.0.4 Oct 2017]Advanced Message Security High Availability Replica (formerly Advanced Message Security Idle Standby)
  • Managed File Transfer Service
  • [V9.0.4 Oct 2017]Managed File Transfer Service High Availability Replica (formerly Managed File Transfer Service Idle Standby)
  • Managed File Transfer Agent


星期五, 1月 19, 2018

如何知道IHS 是否支援Apache的模組

查看<IHS-install-root>/modules/目錄下的.so檔案, 此目錄下的模組即是IHS有支援的模組。

generate duplicate messages into other queues

MQ: You want to put a message into a queue and you want to generate duplicate messages into other queues


必須使用pub/sub的功能來間接完成

Question

Scenarios that are addressed in this technote:

1) You are using point-to-point (queues) with your putting and getting applications. You want to use WebSphere MQ (WMQ) Pub/Sub under the covers and you do not want your putting and getting applications to be aware of Pub/Sub. That is, the application that puts messages into a queue continues to put messages into a queue, and the getting applications keep getting messages from a queue.

2) You are using point-to-point and you want to create "duplicate" messages that will be stored in queues Q1 and Q2, when the message is put into the queue "DESTINATION"

Answer

This example uses the new concepts of "topic objects" and "topic alias" introduced in MQ V7.
Use MQ Explorer or amqsput sample to put a message to the DESTINATION queue, which in turn publishes the message into the topic T1 and the subscribers SUB1 and SUB2 receive the messages, which are stored in queues Q1 and Q2 respectively.
You could also publish directly into topic T1.
A copy of the message will be placed on Q1 and Q2.

Use runmqsc to define the following objects:

define ql(Q1)
define ql(Q2)
define qalias(DESTINATION) target(T1) targtype(topic)
define topic(T1) topicstr('TOPIC1')
define sub(SUB1) topicstr('TOPIC1') dest(Q1)
define sub(SUB2) topicstr('TOPIC1') dest(Q2)

Example of running amqsput and amqsget:

a) Open 3 windows:
window 1: get messages from queue Q1
amqsget Q1 QMGR

window 2: get messages from queue Q2
amqsget Q2 QMGR

window 3: put a message into the queue DESTINATION
amqsput DESTINATION QMGR
Sample AMQSPUT0 start
target queue is DESTINATION
TEST
Sample AMQSPUT0 end

b) Observe that Q1 and Q2 receive the same message:

amqsget Q1 QMGR
Sample AMQSGET0 start
message <TEST>
no more messages
Sample AMQSGET0 end

amqsget Q2 QMGR
Sample AMQSGET0 start
message <TEST>
no more messages
Sample AMQSGET0 end

c) NOTE: Strictly speaking, the messages received by Q1 and Q2 are NOT truly identical. Even though they will have the same payload (text string 'TEST') and same characteristics, each message will have its own unique message-id.

The following is a browse (using: amqsbcg Queue QMGR) of the messages.

Notice that the only differences in this particular example are the last 2 characters from "MsgId" and CorrelId". In your case, more characters in this field could be different.

Message received by Q1:
  MsgId :    X'414D5120514D5F3730312020202020207064DF4E20003603'
                                                             **
  CorrelId : X'414D5120514D5F3730312020202020207064DF4E20001E08'
                                                             **

Message received by Q2:
  MsgId :    X'414D5120514D5F3730312020202020207064DF4E20003602'
                                                             **
  CorrelId : X'414D5120514D5F3730312020202020207064DF4E20001E0E'
                                                             **

c.1) Message received by Q1

****Message descriptor****

StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 546 CodedCharSetId : 437
Format : 'MQSTR '
Priority : 0 Persistence : 0
MsgId : X'414D5120514D5F3730312020202020207064DF4E20003603'
CorrelId : X'414D5120514D5F3730312020202020207064DF4E20001E08'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'QMGR '
** Identity Context
UserIdentifier : 'rivera '
AccountingToken :
X'16010515000000BA1E06D2603C3514885EDBC2EF03000000000000000000000B'
ApplIdentityData : ' '
** Origin Context
PutApplType : '26'
PutApplName : 'QMGR '
PutDate : '20111207' PutTime : '20215396'
ApplOriginData : ' '

GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'

**** Message ****

length - 4 bytes

00000000: 5445 5354 'TEST '

c.2) Message received by Q2

****Message descriptor****

StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 546 CodedCharSetId : 437
Format : 'MQSTR '
Priority : 0 Persistence : 0
MsgId : X'414D5120514D5F3730312020202020207064DF4E20003602'
CorrelId : X'414D5120514D5F3730312020202020207064DF4E20001E0E'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'QMGR '
** Identity Context
UserIdentifier : 'rivera '
AccountingToken :
X'16010515000000BA1E06D2603C3514885EDBC2EF03000000000000000000000B'
ApplIdentityData : ' '
** Origin Context
PutApplType : '26'
PutApplName : 'QMGR '
PutDate : '20111207' PutTime : '20215396'
ApplOriginData : ' '

GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'

**** Message ****

length - 4 bytes

00000000: 5445 5354 'TEST '

****
若是二個queue 不在同一個qmgr上, 就要利用以下指令來建立 pub/sub hierarchy tree.
alter qmgr parent(parent_qmgr_name)

Connecting a queue manager to a publish/subscribe hierarchy




星期一, 1月 15, 2018

sample tool to test connection with MQ qmgr


https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.0.0/com.ibm.mq.dev.doc/q024090_.htm

http://www-01.ibm.com/support/docview.wss?uid=swg21615875

There is an additional MQ test you can run, The amqscnxc sample connect program included with the MQ samples. You need to have the MQ samples module installed to get this. Source code for the utility is also provided with the samples.

The following test will connect to the queue manager and respond that you are connected/or fail:

amqscnxc -x ConnName -c SvrconnChannelName QMgrName

UNIX: (need the ' ' for the -x option)
amqscnxc -x '192.168.1.131(1415)' -c EXCONN MIKE

Windows: (doesn't need the ' ' for the -x option)
amqscnxc -x 192.168.1.131(1415) -c EXCONN MIKE


*** for the MQ v8, you need to inpurt the user name for the connection, you can set the user id in the MQSAMP_USER_ID environment variable.

MQ V8 - Samples can use user ID and password
https://www.ibm.com/developerworks/community/blogs/messaging/entry/bitesize_blogging_mq_v8_samples_can_use_user_id_and_password?lang=en_us





星期二, 12月 19, 2017

如何使用WAS下的scriptLibraries來簡化wsadmin操作

WAS下的scriptLibraries下有一些IBM提供給管理者簡化wsadmin 命令的Library (提供額外的命令來包裝原先複雜的wsadmin 命令), 讓管理可以方便使用。

其使用方法如下﹕(以設定WebContainer thread Pool 為例)

(1)./wsadmin.sh -lang jython -username admin_id -password admin_password

(2)進入wsadmin介面後, 使用execfile來載入擴充的Libraries。
wsadmin>execfile('<WAS-install-root>/scriptLibraries/servers/V70/AdminServerManagement.py')

(3)之後便能使用擴充的指令(至於有哪些指令, 可以自行參考那個.py 檔案的內容說明)
以AdminServerManagement.py 來說其設定Thread Pool的擴充指令為:configureThreadPool
=========================
  Ex40: configureThreadPool
# Example 40: Configure thread pool
def configureThreadPool(nodeName, serverName, parentType, tpName, maxSize, minSize, inactivityTimeout, otherAttrList=[], failonerror=AdminUtilities._BLANK_):
try:
        #--------------------------------------------------------------------
        # Configuring ThreadPool
        #--------------------------------------------------------------------
        print "---------------------------------------------------------------"
        print " AdminServerManagement:  Configuring ThreadPool"
        print " nodeName:               "+nodeName
        print " serverName:             "+serverName
        print " parentType:             "+parentType
        print " threadPoolName:         "+tpName
        print " maximumSize:            %s" % (maxSize)
        print " minimumSize:            %s" % (minSize)
        print " inactivityTimeout:      %s" % (inactivityTimeout)
===========================

(4)依上面說明, 其正確指令可寫成:
wsadmin>
configureThreadPool("loveNode02","base03","ThreadPoolManager","WebContainer","200","100","60000")

(5)其輸出結果如下﹕

---------------------------------------------------------------
 AdminServerManagement:  Configuring ThreadPool
 nodeName:               loveNode02
 serverName:             base03
 parentType:             ThreadPoolManager
 threadPoolName:         WebContainer
 maximumSize:            200
 minimumSize:            100
 inactivityTimeout:      60000
 Optional Attributes:
     otherAttributeList  []
 Usage: AdminServerManagement.configureThreadPool("loveNode02", "base03", "ThreadPoolManager", "WebContainer", "'200'", "'100'", "'60000'")
 Return: If the command is successful, a value of 1 is returned.
---------------------------------------------------------------


[customProperties []]
[inactivityTimeout 60000]
[isGrowable false]
[maximumSize 200]
[minimumSize 100]
[name WebContainer]
1

(6)若要把這二個步驟合成一個, 就自行寫個abc.py, 其內容如下﹕

execfile('<WAS-install-root>/scriptLibraries/servers/V70/AdminServerManagement.py')
configureThreadPool("loveNode02","base03","ThreadPoolManager","WebContainer","200","100","60000")

(7)最後要執行時就只要去指定abc.py 即可:
./wsadmin.sh -f abc.py