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 » IBM MQ API Support » Need major help coding HPUX C for MQSeries JMS.

Post new topic  Reply to topic Goto page 1, 2  Next
 Need major help coding HPUX C for MQSeries JMS. « View previous topic :: View next topic » 
Author Message
mpsmith19
PostPosted: Tue Aug 22, 2006 7:00 am    Post subject: Need major help coding HPUX C for MQSeries JMS. Reply with quote

Novice

Joined: 02 May 2005
Posts: 20

Need to write an API that allows application programmers on HPUX to communicate with a Websphere Java application utilizing MQSeries JMS.

I've coded some native MQSeries but wasn't even aware there was a MQSeries JMS until a couple of weeks ago. I posted a question to this forum asking if there was a special MQSeries JMS API and was told to use the API I was familiar with, but that I may have to handle MQRFH2 headers.

I met with the Websphere programmers and they have no clue what I'm talking about. They say they simply talk JMS and don't do anything with a header of any kind. Obviously they are, but it appears it's done under the covers.

All this brings me to my question. Where do I find IBM documenation on how to code MQSeries JMS on HPUX using C? I've searched the IBM site and this site for several days and can't really find an answer. Although I have seen mention of XMS here, but can't find an HPUX XMS on the IBM site.

Any help would be greatly appreciated.

Michael P. Smith

"I don't mind jumping through hoops blindfolded, but damn it stop attaching them to pendulums and lighting them on fire." - Me
Back to top
View user's profile Send private message
HubertKleinmanns
PostPosted: Tue Aug 22, 2006 7:11 am    Post subject: Reply with quote

Shaman

Joined: 24 Feb 2004
Posts: 732
Location: Germany

Try this document:

http://www.elink.ibmlink.ibm.com/public/applications/publications/cgibin/pbi.cgi?CTY=US&FNC=SRX&PBL=SC34659101
_________________
Regards
Hubert
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Tue Aug 22, 2006 7:31 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

JMS is a Java API.

IBM supplies a C/C++ version which is called XMS, this is a support pack (IA94). It may not be pre-compiled for HP-UX. You can request that it be built for HP/UX. That may not be a priority for the XMS team, though.

The IBM MQ JMS Provider maps the JMS properties onto the MQRFH2 header. So anyone using JMS is using an MQRFH2 header, but under the covers.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
mpsmith19
PostPosted: Tue Aug 22, 2006 7:34 am    Post subject: Reply with quote

Novice

Joined: 02 May 2005
Posts: 20

Thanks for trying Hubert.

I've scanned through the MQSeries - Using Java manual before and it really doesn't help me with calling MQSeries JMS in C.

Guess what I'm really needing is a sample program. Or better yet a manual with a title like MQSeries - Using JMS from non-Java languages. But I don't think IBM has written it

Michael P. Smith
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Aug 22, 2006 7:36 am    Post subject: Reply with quote

Grand High Poobah

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

mpsmith19 wrote:
Or better yet a manual with a title like MQSeries - Using JMS from non-Java languages. But I don't think IBM has written it


Beg to differ:

http://www-128.ibm.com/developerworks/websphere/library/techarticles/0509_phillips/0509_phillips.html


_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mpsmith19
PostPosted: Tue Aug 22, 2006 7:37 am    Post subject: Reply with quote

Novice

Joined: 02 May 2005
Posts: 20

Jeff,

Time so unbelievably short I don't think I could wait for IBM to provide XMS for HPUX. I'll work with my systems administration people to see if they can find out for certain about XMS for HPUX.

If XMS is not available, it should still be possible to parse the MQRFH2 header myself. Lord knows I've had to do ugly things like this in the past. I'm just really wanting to avoid doing them in the future. Do you know of any documentation on the MQRFH2 tags?

Michael P. Smith
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Aug 22, 2006 7:37 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

There are samples for working with the MQRFH2 header, which is what the JMS application will provide unless it has set targClient=MQ, in C.

It is not a simple header to work with.

Look at the pub/sub samples that come with WebSphere MQ.

For example, from amqsresa.c
Code:
          /*********************************************************/
            /* Check that the message is in the MQRFH format.        */
            /*********************************************************/
            if( memcmp(md.Format, MQFMT_RF_HEADER, MQ_FORMAT_LENGTH) == 0 )
            {
              /*******************************************************/
              /* Split the message data into the three important     */
              /* areas, the MQRFH header, the NameValueString that   */
              /* follows it and any user data following that.        */
              /*******************************************************/
              pMQRFHeader = (PMQRFH)pMessageBlock;
              pNameValueString = (PMQCHAR)(pMessageBlock
                                          + MQRFH_STRUC_LENGTH_FIXED);
              nameValueStringLength = pMQRFHeader->StrucLength
                                           - MQRFH_STRUC_LENGTH_FIXED;
              pUserData = pMessageBlock + pMQRFHeader->StrucLength;

_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Aug 22, 2006 7:39 am    Post subject: Reply with quote

Grand High Poobah

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

mpsmith19 wrote:
Do you know of any documentation on the MQRFH2 tags?


MQRFH2 is laid out in the Application Programming Reference. And it's not that ugly. Not a Miss World contender, but fairly straightforward.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mpsmith19
PostPosted: Tue Aug 22, 2006 7:43 am    Post subject: Reply with quote

Novice

Joined: 02 May 2005
Posts: 20

Vitor wrote:
mpsmith19 wrote:
Or better yet a manual with a title like MQSeries - Using JMS from non-Java languages. But I don't think IBM has written it


Beg to differ:

http://www-128.ibm.com/developerworks/websphere/library/techarticles/0509_phillips/0509_phillips.html



Unfortunately XMS does not appear to be available for HPUX.

Michael P. Smith
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Aug 22, 2006 7:46 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Again, look at the pub/sub samples. They're likely already installed on your HP/UX machine...
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Aug 22, 2006 7:47 am    Post subject: Reply with quote

Grand High Poobah

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

The thing you want is never on the platform you need is it?

Crack open that IDE and start coding. It's not as bad as it looks (I think the Grand PooBah must have been startled by a header as a child! ), pain in the neck but it can be done.

I wish you the joy of coding
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Aug 22, 2006 7:52 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I said it wasn't simple. It's not simple.

I didn't say it was hard.

It's not hard to process an MQRFH2. Well, except in COBOL.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
mpsmith19
PostPosted: Tue Aug 22, 2006 7:54 am    Post subject: Reply with quote

Novice

Joined: 02 May 2005
Posts: 20

jefflowrey wrote:

Look at the pub/sub samples that come with WebSphere MQ.

For example, from amqsresa.c


Sorry, not familiar with the MQ naming convention on their samples.

The file amqsresa.c doesn't exist in my MQ samples directory. The closest thing to it is amqsreq0.c. Also, a grep of the samples directory for MQFMT_RF_HEADER comes back with 0 files.

Perhaps I'm on too old a version of MQ for the samples you're quoting? I believe I was told that we're on MQSeries 5.3.
_________________
Michael P. Smith
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Aug 22, 2006 7:56 am    Post subject: Reply with quote

Grand High Poobah

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

jefflowrey wrote:
I said it wasn't simple. It's not simple.

I didn't say it was hard.

It's not hard to process an MQRFH2. Well, except in COBOL.


I stand corrected

Why does everybody have a down on COBOL? Aside from being pedantic, prescriptive, feature poor and inflexible it's an ideal programming language.....

(Funded my formative years in the industry. I have fond memories of some of my COBOL code, coupled with a profound delight in never having to see it again )
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mpsmith19
PostPosted: Tue Aug 22, 2006 8:03 am    Post subject: Reply with quote

Novice

Joined: 02 May 2005
Posts: 20

Vitor wrote:
jefflowrey wrote:
I said it wasn't simple. It's not simple.

I didn't say it was hard.

It's not hard to process an MQRFH2. Well, except in COBOL.


I stand corrected

Why does everybody have a down on COBOL? Aside from being pedantic, prescriptive, feature poor and inflexible it's an ideal programming language.....

(Funded my formative years in the industry. I have fond memories of some of my COBOL code, coupled with a profound delight in never having to see it again )


The API I refer to already exists for our in-house TCP/IP protocol and for SeeBeyond's JMS. Part of writing the API involved writing sample programs in the various languages that call it. You probably guess we're I'm headed. Yup. One of them is COBOL. MicroFocus COBOL to be exact.

I think I hurt pulled a muscle trying to remember how to code in COBOL. Wonder if I can get workman's comp for it?
_________________
Michael P. Smith
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » IBM MQ API Support » Need major help coding HPUX C for MQSeries JMS.
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.