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 » PCF from NT to HP-UX/AIX; MQ version problems?

Post new topic  Reply to topic
 PCF from NT to HP-UX/AIX; MQ version problems? « View previous topic :: View next topic » 
Author Message
kolthorr
PostPosted: Sun Mar 10, 2002 8:14 pm    Post subject: Reply with quote

Apprentice

Joined: 09 Mar 2002
Posts: 31

Hi all,
I'm trying to run a program that uses PCFs to enquire about channel status from an NT Client (MQ v5.2.1) to various queue managers. It works fine when talking to NT (MQ v5.0) servers, but barfs badly when run against unix servers (MQ v5.2). (The number '33554432' often features prominently amoung MsgType, parameter count, etc - meaningless numbers; and a seemingly random number of replies will come back, regardless of the number of channels actually in use).

If I compile the code on the unix boxes and run it 'locally' on the unix box, it works fine, so I think the PCF command is correct.

I can't find anything on the web suggesting this _shouldn't_ work. Are there known problems doing this across platforms and MQ versions?

Thanks very much for any thoughts.
Regards,
Andrew Wright
Back to top
View user's profile Send private message
kolban
PostPosted: Mon Mar 11, 2002 5:23 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

At a quick guess I would say it has something to do with the representation of integer numebrs. On intel based machines it is little endian while on unix it is big endian. How are you building the PCF messages? If by hand, consider the use of the MQAI package.
Back to top
View user's profile Send private message
kolthorr
PostPosted: Mon Mar 11, 2002 2:21 pm    Post subject: Reply with quote

Apprentice

Joined: 09 Mar 2002
Posts: 31

Thanks for the tip! That would seem to be a plausible reason (although I thought MQ was supposed to handle those sort of conversions in messages?). I am indeed building the PCF by hand. I will investigate the MQAI as an alternative.

Regards,
Andrew Wright
Back to top
View user's profile Send private message
kolthorr
PostPosted: Mon Mar 11, 2002 10:16 pm    Post subject: Reply with quote

Apprentice

Joined: 09 Mar 2002
Posts: 31

Hi again (in reponse to my original post),

Yep, it is an endian issue. The code will have to detect what platform it's running on and convert/not convert appropriately.

Someone suggested MQ only converts messages of format MQSTR, which is why it isn't converting the Admin formatted message coming from the command server. Is this correct? (Just wondering for my own interest).

Regards,
Andrew Wright
Back to top
View user's profile Send private message
EddieA
PostPosted: Tue Mar 12, 2002 10:49 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

MQ will convert any message where the format is known.

What did you put in the MQMD Format. Have you tried MQADMIN.

Cheers,

_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
mrlinux
PostPosted: Tue Mar 12, 2002 11:13 am    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

When building messages for MQSeries use the following C calls, Iam sure they
are available in other Languages

On intel the following will byte swap on all other platforms that are big endian it doesnt do anything.

To convert from Host to Network

htons short integer
htonl long

To convert from Network to Host

ntohs short integer
ntohl long




_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
Back to top
View user's profile Send private message Send e-mail
kolthorr
PostPosted: Tue Mar 12, 2002 8:37 pm    Post subject: Reply with quote

Apprentice

Joined: 09 Mar 2002
Posts: 31

Hi again,

I finally worked out the problem - I am first doing an MQGET with browse to get the size of the PCF message, then a second GET to actually retrieve it. I was setting the Encoding and CCSID fields in the MD before the first get, but not before the second. MQ was changing the values on the output of the first get, which was then getting fed into the second GET call, and messing things up.

Easily fixed! MQ does handle the conversions when you tell it the right things after all!

Thanks to all who replied and helped along the way.
Kind regards,
Andrew Wright
Back to top
View user's profile Send private message
rajpath
PostPosted: Wed Jun 12, 2002 9:56 pm    Post subject: PCF Commands Reply with quote

Novice

Joined: 12 Jun 2002
Posts: 12
Location: Mumbai

Can u show the code for PCF used on Windows NT.In fact I am new to the same.Just trying PCF commands on WindowsNT.Please response ASAP.
_________________
Raj
Software Engineer
Mahindra Consulting Ltd
Mumbai-101 India
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » PCF from NT to HP-UX/AIX; MQ version problems?
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.