hi Morag,
trigger def:
DEFINE QLOCAL('MYQ') +
INITQ('DLQ.INITQ') +
TRIGGER +
PROCESS('DLQHANDLER') +
TRIGDATA('sad') +
TRIGTYPE(EVERY)
process def
DEFINE PROCESS('DLQHANDLER') +
APPLTYPE(WINDOWSNT) + [or "WINDOWS"- doesn't matter - same result]
APPLICID('c:\coliance\cat.bat') +
USERDATA('wer')
service def (you may recognise this ;-):
DEFINE SERVICE('TRIGGER.MONITOR') +
CONTROL(QMGR) +
SERVTYPE(SERVER) +
STARTCMD('+MQ_INSTALL_PATH+bin64\runmqtrm') +
STARTARG('-m +QMNAME+ -q DLQ.INITQ') +
STOPCMD('+MQ_INSTALL_PATH+bin64\amqsstop') +
STOPARG('-m +QMNAME+ -p +MQ_SERVER_PID+')
bat file:
echo "Hello World. " %time% > C:\coliance\hello.txt
IF NOT "%0"=="" echo %0 >>c:\coliance\hello.txt
IF NOT "%1"=="" echo %1 >>c:\coliance\hello.txt
IF NOT "%2"=="" echo %2 >>c:\coliance\hello.txt
IF NOT "%3"=="" echo %3 >>c:\coliance\hello.txt
output: from MQ trigger:
"Hello World. " 8:56:25.35
c:\coliance\cat.bat
output from cmdline:
"Hello World. " 8:59:18.37
c:\coliance\cat.bat
hello
john
------------------------------
John Hawkins
Integration Consultant
------------------------------
Original Message:
Sent: Thu November 18, 2021 07:13 PM
From: Morag Hughson
Subject: runmqtrm not passing params?
It's hard to say what you need to correct when you don't show us the definitions you have created. Where did you put the command line parameters? Possible places are in the PROCESS object's USERDATA or the triggered queue's TRIGDATA (or both). The ENVDATA is not for passing parameters. That's just for getting a process to run in the background. Show us your definitions and we might be able to see what's up.
Cheers,
Morag
------------------------------
Morag Hughson
MQ Technical Education Specialist
MQGem Software Limited
Website: https://www.mqgem.com
------------------------------