Hi Team, I am new to Mqseries and new to perl scripting. I am writing one perl script to insert message into my local queue by using following Api. 1)MQCONN 2)MQPUT 3)MQOPEN 4)MQGET When i am running the script it is not sending the message to local queue and giving some big Junk value in resoncode and complition code. Which creating problem for me to identify exactly for which reson the script is failing,as mostof the Mqseries reson code and completion code is 4digit Number.In my case it is comming 10 digit. So could you please suggest me,how can i need to use mqseries resoncode and compltion code in my script to get the proper resoncode and completion code insteadof junk value. Following is my snapshot of the code and my output- When i am executing the below code in my perl script,when i am printing the reson code and compltion code after and before exection of MQCONN function i am getting the below big number as output.which is after this code.

my $compCode = MQSeries::MQCC_FAILED; my $Reason = MQSeries::MQRC_UNEXPECTED_ERROR; my $mnone = MQSeries::MQRC_NONE; print "-------------------------------------------\n"; print "mqnone is $mnone\n"; print "code is $compCode\n"; print "Reason is $Reason\n"; print "Before calling MQCONN\n"; print "-------------------------------------------\n"; $Hconn = MQCONN($qm_name, $compCode, $Reason, )|| die "Unable to Connect to Queuemanager +\n"; print "code is $compCode\n"; print "Reason is $Reason\n";

Output of the above code- mqnone is 4185249900 code is 12775184492 Reason is 9431638464620 Before calling MQCONN ------------------------------------------------------------------------------------------------------ For testing purpose i tried this below code in my perl script. my $mqnone = MQSeries:: MQRC_NONE In Mq the value of the Macro MQRC_NONE is zero.When i have tried to print this,it print a bignumber like below,instead of printing the number Zero. mqnone is 4185249900 Pleas help me to resolve this issue,as i am stuck inthis from quite long time. Thanks, Santosh


In reply to help me to resolve Mqseries resoncode giving junk value issue by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.