Author |
Message
|
sebastian |
Posted: Wed Nov 12, 2003 12:15 pm Post subject: Perlscript on NT using MQSeries |
|
|
 Centurion
Joined: 12 Nov 2003 Posts: 110 Location: Philadelphia
|
I am trying to run a Perlscript on an NT machine using MQSeries. All the script does is attempt an MQCONN and then returns a message if it succeeds or fails. It runs fine on our Unix machine but chokes on our NT server with the message "Can't locate MQSeries.pm in @INC"
Would I be correct in assuming that this file is an MQ command library used to recognize MQ commands used in the script? Does anyone know what I would need to do to correctly configure my environment?
The code is short so I will attach it
any feedback is greatly appreciated
thanks,
Sebastian
#!/opt/perl/bin/perl
use MQSeries;
$qmgr='PR01U64D';
print $qmgr;
#**********************************************
# connect to QM(s) named in config if connect fails, die
#**********************************************
print "**attempting MQconn\n";
$SRCHconn = MQCONN($PR01U64D,$CompCode,$Reason);
if ($CompCode > 0){
die "can't connect to source $SRCName code $CompCode reason $ReasonText \n";
} else {
print "it looks good \n";
} _________________ sebastian signature |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Nov 12, 2003 12:19 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You do need to install the MQSeries Perl modules on this machine in order to use MQSeries from Perl. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
sebastian |
Posted: Wed Nov 12, 2003 12:31 pm Post subject: |
|
|
 Centurion
Joined: 12 Nov 2003 Posts: 110 Location: Philadelphia
|
Jeff - I'm sorry, I am a bit confused by your response. I want to run a Perlscript on an NT server that can access MQ message queues on the same server. I am having problems just trying to perform a simple connection and I think it is because there is some MQseries configuration I am missing. I have done some digging since my first posting and I see something about an MQ ActiveX client. Are you familiar with this and do you think it might explain why I am getting this message?
All constructive responses welcome,
Seby _________________ sebastian signature |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Nov 12, 2003 12:55 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The perl modules are available through the Comprehensive Perl Archive Network (CPAN).
I believe they're also available as a Support Pack on IBM's website.
I think you'll have to compile some stuff, though, which will require a c compiler.
Hopefully someone who has used these can give you a better idea of the installation process for Windows. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mrlinux |
Posted: Thu Nov 13, 2003 8:15 am Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
If you get the module from CPAN you will need to have a C compiler
we use MS VC 6.0 and it works for us.
http://search.cpan.org/~hbiersma/MQSeries-1.21/MQSeries.pm _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
sebastian |
Posted: Tue Jan 13, 2004 5:41 am Post subject: Issue resolved - thanks! |
|
|
 Centurion
Joined: 12 Nov 2003 Posts: 110 Location: Philadelphia
|
I had Visual Studio installed on my workstation (which included the cl.exe) and went through the install procedure again and things look much better.
I ran my simple Perl script which just does an MQCONN and returns a message for success or failure. It works fine when I access the MQ environment on my workstation but I get the message "2058 - qmgr name error" when I try to access a remote MQ server. I double checked that the qmgr is spelled correctly, a server connection channel is set on the remote MQ server and I set the MQSERVER set variable correctly. I even did an amqsputc to the test queue and it works fine so I'm not sure why this is happening yet. I'll search for a similar issue listed and if I can't find one perhaps I'll create a new posting.
In any case, the original issue that was the reason for sending this email has been resolved. I really appreciate all of the help everyone has provided and I hope that I can pay back the favor as I grow from my 'newbie' status.
Thank you very much,
Sebastian _________________ sebastian signature |
|
Back to top |
|
 |
sebastian |
Posted: Tue Jan 13, 2004 5:43 am Post subject: issue resolved - thanks! |
|
|
 Centurion
Joined: 12 Nov 2003 Posts: 110 Location: Philadelphia
|
I had Visual Studio installed on my workstation (which included the cl.exe) and went through the install procedure again and things look much better.
I ran my simple Perl script which just does an MQCONN and returns a message for success or failure. It works fine when I access the MQ environment on my workstation but I get the message "2058 - qmgr name error" when I try to access a remote MQ server. I double checked that the qmgr is spelled correctly, a server connection channel is set on the remote MQ server and I set the MQSERVER set variable correctly. I even did an amqsputc to the test queue and it works fine so I'm not sure why this is happening yet. I'll search for a similar issue listed and if I can't find one perhaps I'll create a new posting.
In any case, the original issue that was the reason for sending this email has been resolved. I really appreciate all of the help everyone has provided and I hope that I can pay back the favor as I grow from my 'newbie' status.
Thank you very much,
Sebastian
 _________________ sebastian signature |
|
Back to top |
|
 |
mrlinux |
Posted: Tue Jan 13, 2004 7:11 am Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
You will need to specify the following if you want to client connect to another server, when MQServer is on the system you are running your perl script from.
use MQSeries::MQClient; _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
sebastian |
Posted: Tue Jan 13, 2004 7:46 am Post subject: |
|
|
 Centurion
Joined: 12 Nov 2003 Posts: 110 Location: Philadelphia
|
Jeff:
When I change my script to "use MQSeries::MQClient;" I get an error message of "Can't locate MQSeries/MQClient.pm in @INC"
I did a search on my hard drive for "MQClient.pm" and got no hits. I am wondering now if the third party creator of these modules built in this ability. I will check the install script.
Any suggestions?
Seb _________________ sebastian signature |
|
Back to top |
|
 |
mrlinux |
Posted: Tue Jan 13, 2004 8:33 am Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
I messed up it should be this, not the other way
use MQClient::MQSeries; _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
sebastian |
Posted: Tue Jan 13, 2004 9:32 am Post subject: |
|
|
 Centurion
Joined: 12 Nov 2003 Posts: 110 Location: Philadelphia
|
That did the trick....thanks a lot man..
Seb
 _________________ sebastian signature |
|
Back to top |
|
 |
|