ibm - Run MQSC Command via SYSTEM.ADMIN.COMMAND.EVENT -
i have connected remotely qmgr via mq explorer on windows. mq server version 7.5.0.1. can put messages in system.admin.command.event mq explorer , when dump system.admin.command.event, can see messages. long know, should able run pcf commands , mqsc commands via channel. so, put display qmgr all message inside queue , can see message on mq server. question how can run message remotely via channel? thanks.
ibm doc indicates should able receive command result in system.mqsc.reply.queue. can not browse queue client mq explorer. queue type queue model.
couple of problems here.
first, using wrong queue. command server listens on system.admin.command.queue. queue sending messages, system.admin.command.event queue qmgr puts event messages after executing commands, provided of course command events enabled.
the second problem, jason mentions, runmqsc processor takes human-readable script , converts commands qmgr can understand. passing textual commands directly command server won't work.
typically want passing commands runmqsc directly such as...
echo display qmgr | runmqsc myqmgrname if require ability client, want either download supportpac mo72, or head on mq gem , pick copy of mqscx. either of these accept command above on local queue manager, , both can supplied mq channel params , connect remote qmgr.
in addition basic functionality, mqscx product has own internal script parsing , execution. suppose, instance, want depending on command level of qmgr.
using runmqsc issue command above, filter resulting 2-column output through grep, awk, or similar, capture final output variable. might need multiple times capture multiple values, invoking new runmqsc each time , parsing output in script. must generate string actual command wanted run when started this, , pass invocation of runmqsc.
alternatively, mqscx lets issue display command, reference resulting values directly name. example, can pass mqscx couple lines of script telling inquire on qmgr , take conditional action based on command version, without ever having drop shell, bat or perl script.
full disclosure, not work or commission mq gem. don't beat head against wall writing 100 lines of code 2 do. if amount of mqsc scripting, roi on mqscx measured in minutes. , happens 100% on-topic answer question.
Comments
Post a Comment