help with perl + MQBEGIN + MQGET and MQPUT options

Discussion in 'Perl Misc' started by Golem, Dec 29, 2003.

  1. Golem

    Golem Guest

    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
     
    Golem, Dec 29, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Cliff  Martin
    Replies:
    1
    Views:
    3,055
    Larry Smith
    Jan 31, 2007
  2. jacksu
    Replies:
    0
    Views:
    525
    jacksu
    Oct 9, 2007
  3. Utkado
    Replies:
    2
    Views:
    2,159
  4. Bryan Richardson
    Replies:
    6
    Views:
    301
    Bryan Richardson
    Feb 25, 2008
  5. Sijo Kg
    Replies:
    1
    Views:
    104
    Justin Collins
    Jan 7, 2009
Loading...

Share This Page