实现功能:创建队列的脚本,在81人行端执行
#!/bin/bash # 创建队列的脚本,在81人行端执行 . /etc/profile . ~/.bashrc #运行前按需修改:队列管理器名称、机构代码、机构名称、IP!!! # 本机MQ队列管理器名称 生产:QM_FTZMIS_0900_01 测试:QM_FTZMIS_TEST_0900_01 QMNAME=QM_FTZMIS_10000_01 # 金融机构12位编码 JGBM=99999 # 金融机构名称 JGMC=BeiJingYinHang # MQ服务器IP IP=200.31.155.82 # 临时文件 tmpfile=addjg.in # 创建本地批量队列 echo DEFINE QLOCAL"('PBC.${JGBM}.BATCH.TRAN')" USAGE"(XMITQ)" + > $tmpfile echo TRIGGER + >> $tmpfile echo TRIGDATA"('10000.${JGBM}.B1')" + >> $tmpfile echo DESCR"('${JGMC}')" + >> $tmpfile echo INITQ"('SYSTEM.CHANNEL.INITQ')" >> $tmpfile echo >> $tmpfile # 创建本地联机队列 echo DEFINE QLOCAL"('PBC.${JGBM}.ONLINE.TRAN')" USAGE"(XMITQ)" + >> $tmpfile echo TRIGGER + >> $tmpfile echo TRIGDATA"('10000.${JGBM}.O1')" + >> $tmpfile echo DESCR"('${JGMC}')" + >> $tmpfile echo INITQ"('SYSTEM.CHANNEL.INITQ')" >> $tmpfile echo >> $tmpfile # 创建远程批量队列 echo DEFINE QREMOTE "('PBC.${JGBM}.BATCH.OUT')" + >> $tmpfile echo RNAME"('PBC.${JGBM}.BATCH.OUT')" + >> $tmpfile echo XMITQ"('PBC.${JGBM}.BATCH.TRAN')" + >> $tmpfile echo DESCR"('${JGMC}')" + >> $tmpfile echo RQMNAME"('QM_FTZMIS_${JGBM}_01')" >> $tmpfile echo >> $tmpfile # 创建远程联机队列 echo DEFINE QREMOTE "('PBC.${JGBM}.ONLINE.OUT')" + >> $tmpfile echo RNAME"('PBC.${JGBM}.ONLINE.OUT')" + >> $tmpfile echo XMITQ"('PBC.${JGBM}.ONLINE.TRAN')" + >> $tmpfile echo DESCR"('${JGMC}')" + >> $tmpfile echo RQMNAME"('QM_FTZMIS_${JGBM}_01')" >> $tmpfile echo >> $tmpfile # 创建批量接收通道 echo DEFINE CHANNEL "('${JGBM}.10000.B1')" CHLTYPE"(RCVR)" DESCR"('${JGMC}')" >> $tmpfile echo >> $tmpfile # 创建联机接收通道 echo DEFINE CHANNEL "('${JGBM}.10000.O1')" CHLTYPE"(RCVR)" DESCR"('${JGMC}')" >> $tmpfile echo >> $tmpfile # 创建批量发送通道 echo DEFINE CHANNEL "('10000.${JGBM}.B1')" CHLTYPE"(SDR)" + >> $tmpfile echo CONNAME"('${IP}(9100)')" + >> $tmpfile echo DESCR"('${JGMC}')" + >> $tmpfile echo XMITQ"('PBC.${JGBM}.BATCH.TRAN')" >> $tmpfile echo >> $tmpfile # 创建联机发送通道 echo DEFINE CHANNEL "('10000.${JGBM}.O1')" CHLTYPE"(SDR)" + >> $tmpfile echo CONNAME"('${IP}(9100)')" + >> $tmpfile echo DESCR"('${JGMC}')" + >> $tmpfile echo XMITQ"('PBC.${JGBM}.ONLINE.TRAN')" >> $tmpfile echo >> $tmpfile runmqsc $QMNAME <$tmpfile> result.out # rm -f $tmpfile # notepad result.out
版权声明:本文为xiaozhuangyumaotao原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。