Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

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