ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » How to setup MQSeries in Perl

Post new topic  Reply to topic
 How to setup MQSeries in Perl « View previous topic :: View next topic » 
Author Message
santy84
PostPosted: Wed May 11, 2016 11:32 pm    Post subject: How to setup MQSeries in Perl Reply with quote

Novice

Joined: 11 May 2016
Posts: 12

I am assigned with placing request messages to Websphere MQ queue and listening to response queue for response message using perl script.

I had experience in MQ but not in Perl scripting ..

I googled on perl modules found some thing called "CPAN mqseries module" can be used to integrate WBI MQ.

However I don't have any idea how to setup that in my unix environment.

Even my unix team here don't have any idea about setup and they were asking "whether software is having RPM package or AIX binaries" .. but I don't see them any where. They don't have any idea on how to setup using CPAN.

I tried copy all the .pm files from mqseries.1.34 which I downloaded from above links under /usr/opt/perl/5.8.8/lib/ how getting following error while trying to call some sample perl which just loads the modules.

Here I attached my sample script.
package myMQModule;

use strict;
use warnings;

use MQSeries;
use MQSeries::QueueManager;
use MQSeries::Queue;
use MQSeries::Message;


1; # end with a true value

getting following error while running above script`

"functions" is not defined in %MQSeries::EXPORT_TAGS at /usr/opt/perl5/lib/5.8.8/aix-thread-multi/MQSeries/QueueManager.pm line 20 Can't continue after import errors at /usr/opt/perl5/lib/5.8.8/aix-thread-multi/MQSeries/QueueManager.pm line 20 BEGIN failed–compilation aborted at /usr/opt/perl5/lib/5.8.8/aix-thread-multi/MQSeries/QueueManager.pm line 20`

So I need help in how to setup meseries module in my unix environment and is there any guide to do the same. You help highly appreciated .. Please help !!!!
Back to top
View user's profile Send private message
santy84
PostPosted: Wed May 11, 2016 11:33 pm    Post subject: Reply with quote

Novice

Joined: 11 May 2016
Posts: 12

I given following links to my unix team
http://search.cpan.org/~mqseries/MQSeries-1.34/
http://search.cpan.org/~miyagawa/App-cpanminus-1.7040/lib/App/cpanminus.pm
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu May 12, 2016 4:11 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

To install the module, it's something as basic as 'cpan install MQSeries' - although that syntax may not be completely correct.

Just run cpan, and get it to give you help. Or man cpan.

If nobody on your team has experience with Perl - it seems odd that you are being asked to use it.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu May 12, 2016 4:54 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqjeff wrote:
If nobody on your team has experience with Perl - it seems odd that you are being asked to use it.




If your site doesn't use Perl (because no one has any experience in it):

a) How was Perl selected as a platform for this task?
b) What do you currently use for this class of task and why not use it here?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
santy84
PostPosted: Thu May 12, 2016 7:32 pm    Post subject: Reply with quote

Novice

Joined: 11 May 2016
Posts: 12

Vitor wrote:
mqjeff wrote:
If nobody on your team has experience with Perl - it seems odd that you are being asked to use it.




If your site doesn't use Perl (because no one has any experience in it):

a) How was Perl selected as a platform for this task?
b) What do you currently use for this class of task and why not use it here?


For perl scripting, we have guys who has basic experience but they don't have any exposure in module installations specially mq modules

Our unix team don't have idea as well on CPAN, they keep asking aix binaries not found in those downloads etc..

I will give a little background on our environment and why I choose perl to interact with MQ.

Currently we have perl script which calls stand alone java class. Java class intern calls MQ and places a trigger message on MQ Queue.

Perl script being called by scheduler called "Active Batch", we create few jobs in active batch which will be triggered based on a schedule time.

Status of the jobs will be success if its able to place a message on to the MQ queue.

However once message has been placed in mq queue underlying message flow service which will pick and process the message.

Hear our intension is to capture end result mb service in the active batch instead of capturing the message put status on MQ queue.

For that we are changing our mb services to place reseponse message on response queue and java program keep listen to the response queue once it receives the success/failure message
then it will indicate to active batch schedule . In this way we can capture the actual stataus of the service instead of getting the status for just placing a message on MQ Queue.

But here I though why we need to use java in between when perl having a option of interacting with MQ, so that I can elimiate stand alone java program.

In order for me to understand how perl being used to call mq I come across this cpan module but I don't have any idea to install the same.

As I mentioned in my initial post I tried just copying the respective files under /usr/opt/perl folders but which is of no use...

A guide document or steps would be helpful for me to proceed.

Thanks
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri May 13, 2016 4:13 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Perl/CPAN really likes to compile modules at install time - except of course for things that don't have source available. Like MQ.

If you are trying to install the MQSeries modules, you need the MQ Client already installed.

You need to do this from a system that has a compiler environment installed. On AIX, I think this is still an IBM tool, and not generic gcc.

You can, however, compile/install a perl module on one system and then move the compiled resources to other systems.

http://www.cpan.org/modules/INSTALL.html

The readme for the MQ modules also has specific instructions.
http://search.cpan.org/~mqseries/MQSeries-1.34/README

Again, this requires a compiler and either the MQ Server or Client install.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
santy84
PostPosted: Thu May 19, 2016 1:21 am    Post subject: Reply with quote

Novice

Joined: 11 May 2016
Posts: 12

mqjeff wrote:
Perl/CPAN really likes to compile modules at install time - except of course for things that don't have source available. Like MQ.

If you are trying to install the MQSeries modules, you need the MQ Client already installed.

You need to do this from a system that has a compiler environment installed. On AIX, I think this is still an IBM tool, and not generic gcc.

You can, however, compile/install a perl module on one system and then move the compiled resources to other systems.

http://www.cpan.org/modules/INSTALL.html

The readme for the MQ modules also has specific instructions.
http://search.cpan.org/~mqseries/MQSeries-1.34/README

Again, this requires a compiler and either the MQ Server or Client install.


Is there any other way I can install MQseries module other than the CPAN, as my servers are not allowed to connect to internet / external world via ftp or sftp.
Back to top
View user's profile Send private message
exerk
PostPosted: Thu May 19, 2016 2:05 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

santy84 wrote:
Is there any other way I can install MQseries module other than the CPAN, as my servers are not allowed to connect to internet / external world via ftp or sftp.

mqjeff wrote "...You can, however, compile/install a perl module on one system and then move the compiled resources to other systems..."

Find a system you can expose to the internet, do the needful, then move it.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu May 19, 2016 4:37 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Download the tar.gz, and unzip it and compile/install it.

(tar -xvzf ... ; cd ...; make; something somthing something per instructions in the readme)
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » How to setup MQSeries in Perl
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.