| Author | Message | 
		
		  | zigeesha | 
			  
				|  Posted: Tue Aug 17, 2004 4:22 pm    Post subject: mqi api calls |   |  | 
		
		  | Apprentice
 
 
 Joined: 16 Aug 2004Posts: 32
 Location: california
 
 | 
			  
				| Hi everyone, 
 I have mqseries v 5.3 installed on redhat linux n i need to acess all the 13 MQI API calls.I have 2 basic questions
 
 1) Firstly do they get installed by default along with the mq package if yes then in which directory do i look into
 
 2) Secondly if they aren't there by default then from where n how do i download n install them n make them acessible ...
 
 Coz i need to create test applications using the API calls as a part of my project
 ..
 
 Can u plz explain in detail
 
 regards lakshmi
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | clindsey | 
			  
				|  Posted: Tue Aug 17, 2004 6:04 pm    Post subject: |   |  | 
		
		  | Knight
 
 
 Joined: 12 Jul 2002Posts: 586
 Location: Dallas, Tx
 
 | 
			  
				| lakshmi, 
 List the packages you have installed with 'rpm -q -a | grep MQSeries'.
 You need to have MQSeriesSDK and MQSeriesSamples. This will give you what you need to build an application using the APIs.
 
 The install will create a link to the headers in /usr/include and to the libs in /usr/lib so you don't need any special setup in the config.
 
 First, go to /opt/mqm/samp. You will find many sample programs here that you can start with. Most of them have compiled binaries in /opt/mqm/samp/bin if you want to try a sample without building it.
 
 At the top of this web site, you will find a 'documentation' tab. Click on it and you get a link the the App Programmer's Guide and Reference. The reference has a chapter on building application using Linux. It will give you the compile and link options, but generally you can use this form:
 'gcc -o myprog myprog.c -lmqm' for c programs.
 
 Hope this helps,
 Charlie
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | zigeesha | 
			  
				|  Posted: Wed Aug 18, 2004 10:27 am    Post subject: how do i start abt |   |  | 
		
		  | Apprentice
 
 
 Joined: 16 Aug 2004Posts: 32
 Location: california
 
 | 
			  
				| Thx charlie it did help me find the files but i was wondering how do i actually get started with writing simple java programs to demonstrate the MQOPEN,MQGET etc .............i am working with the Websphere Application Server 51 /.. can u plz sugggest
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | vennela | 
			  
				|  Posted: Wed Aug 18, 2004 10:36 am    Post subject: |   |  | 
		
		  |  Jedi Knight
 
 
 Joined: 11 Aug 2002Posts: 4055
 Location: Hyderabad, India
 
 | 
			  
				| With Java MQOPEN, MQCONN etc are wrapped into something else like accessQueue etc. Look at the samples in the repository on this site for java samples.
 You can do PUT, GET etc using those java samples.
 You may also wanna read the Using Java Manual. You can go to it by clicking on the documentation link on the top of this page
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | zigeesha | 
			  
				|  Posted: Wed Aug 18, 2004 11:09 am    Post subject: re:mqi |   |  | 
		
		  | Apprentice
 
 
 Joined: 16 Aug 2004Posts: 32
 Location: california
 
 | 
			  
				| Charlie if u are talking about the amqsput n amgsget then i know how to do it but i need to write such similar programs to open ,close connect etc ie to demonstrate all the API calls...plz suggest as soon as possible |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | vennela | 
			  
				|  Posted: Wed Aug 18, 2004 11:18 am    Post subject: |   |  | 
		
		  |  Jedi Knight
 
 
 Joined: 11 Aug 2002Posts: 4055
 Location: Hyderabad, India
 
 | 
			  
				| What is your plan on demonstrating? You will connect to a QMGR how will you prove it?
 You will OPEN a queue, how will you prove it?
 You will PUT a message, how will you demonstrate it?
 You will GET a message, how will you demonstrate it?
 You will issue a MQBEGIN call and how will you demonstate a UOW has been started?
 
 What programming language do you want to use for this?
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | zigeesha | 
			  
				|  Posted: Wed Aug 18, 2004 12:09 pm    Post subject: |   |  | 
		
		  | Apprentice
 
 
 Joined: 16 Aug 2004Posts: 32
 Location: california
 
 | 
			  
				| well i want use java to create sample applications which demonstrate each of the calls...unlike the sample applications we have in  C i want to do it in java......... 
 Can anyone tell me where exactly will i be able to find the directory containing the MQI calls
 
 Last edited by zigeesha on Wed Aug 18, 2004 12:51 pm; edited 1 time in total
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | clindsey | 
			  
				|  Posted: Wed Aug 18, 2004 12:28 pm    Post subject: |   |  | 
		
		  | Knight
 
 
 Joined: 12 Jul 2002Posts: 586
 Location: Dallas, Tx
 
 | 
			  
				| Go to this url http://www.developer.ibm.com/tech/sampmq.html and scroll down until you see the section for java programs. MSender will show you how to put a message on a queue. MQBrowse shows how to get a message (non-destructive) mode. This will get you started. Then you need to look at the WebShpere MQ "Using Java" manual to get details on all class methods and attributes. 
 Charlie
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | fjb_saper | 
			  
				|  Posted: Wed Aug 18, 2004 4:17 pm    Post subject: Re: how do i start abt |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 18 Nov 2003Posts: 20767
 Location: LI,NY
 
 | 
			  
				| 
   
	| zigeesha wrote: |  
	| Thx charlie it did help me find the files but i was wondering how do i actually get started with writing simple java programs to demonstrate the MQOPEN,MQGET etc .............i am working with the Websphere Application Server 51 /.. can u plz sugggest
 |  
 Do not forget to check out all the JMS stuff. In effect if you are going to Use WAS 5.1 I would not spend any time on base java but concentrate my efforts on the JMS parts of it. Check out the using java manual.
 
 Google for JMS and check out the sun website to learn more about the theories behind JMS and how it works.
 
 Have fun.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | zigeesha | 
			  
				|  Posted: Wed Aug 18, 2004 6:42 pm    Post subject: need help |   |  | 
		
		  | Apprentice
 
 
 Joined: 16 Aug 2004Posts: 32
 Location: california
 
 | 
			  
				| Hi all, 
 I am new to mqi n wanted  am am kind of browsing .I wanted to get to know a couple of answers
 
 I already have java classes for mq installed  and wanted to exactly know  where to look for the  sample programs n all the required classes for writing sample java programs using the MQI calls ...........
 
 
 Do let me know soon
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | clindsey | 
			  
				|  Posted: Wed Aug 18, 2004 7:19 pm    Post subject: |   |  | 
		
		  | Knight
 
 
 Joined: 12 Jul 2002Posts: 586
 Location: Dallas, Tx
 
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | zigeesha | 
			  
				|  Posted: Fri Aug 20, 2004 2:12 pm    Post subject: thx again |   |  | 
		
		  | Apprentice
 
 
 Joined: 16 Aug 2004Posts: 32
 Location: california
 
 | 
			  
				| Thx very much for the above link was really helpful..and am now on my way building servlets to implement MQ API calls 
 lakshmi
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  |  |