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
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