help with perl + MQBEGIN + MQGET and MQPUT options

G

Golem

Hello,
I'd like to write 2 scripts which should
1) read from a MQSeries queue (with wait unlimited) and write to an
oracle DB
2) read from Oracle and write to a MQSeries queue
I would like to use both mq and oracle transactions
I'd like to do that in perl with MQSeries modules and DBI+ DBD::Oracle
I'd also like to use the plain syntax in MQ and not the OO one (the
scripts will be mantained by people who required this).
some sample in c of my ideas could be:
http://www.fiendish.demon.co.uk/MQSeries/samples/write_to_oracle.c

my problem is I have some real troubles in using MQCMIT and also my
MQCLOSE option is complaining with reason 0 and compcode 0

this is same working code I tried:
_________________________________________________
$coption = { 'ChannelName' => $channelname,
'TransportType' => 'TCP',
'ConnectionName' => '$connectionname',
};
$Hconn = MQCONNX($qmgr_name, { 'ClientConn' => $coption
}, $cc, $re);

$ObjDesc = {
ObjectName => $queuename,
};

$Hobj = MQOPEN($Hconn,$ObjDesc,$Options,$CompCode,$Reason);


$GetMsgOpts = {
Options => MQGMO_FAIL_IF_QUIESCING | MQGMO_SYNCPOINT
| MQGMO_WAIT,
WaitInterval => MQWI_UNLIMITED,
};
$MsgDesc = {
CorrelId => $correlid,
Data => $data
};

$Buffer = MQGET($Hconn,$Hobj,$MsgDesc,$GetMsgOpts,$BufferLength,$CompCode,$Reason);
________________________________________________________

could anyone help me in providing syntax for the MQCONNECT, MQBEGIN
MQGET or MQPUT , MQCMIT options called in a perl script ?
Infinite thanks
Golem
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top