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 Telemetry / Low Latency Messaging / Everyplace » Server Client connection

Post new topic  Reply to topic
 Server Client connection « View previous topic :: View next topic » 
Author Message
bsn
PostPosted: Mon Jun 05, 2006 3:32 am    Post subject: Server Client connection Reply with quote

Newbie

Joined: 01 Jun 2006
Posts: 5
Location: Bangalore

How to specify host name,channel name & QM name,port in a C program that runs to put a message from client machine ?

In java Environmental variable are easily set.
But I am not getting how to set in C.

Please help me.
Thanks in Advance.
Back to top
View user's profile Send private message
LuisFer
PostPosted: Mon Jun 05, 2006 3:38 am    Post subject: Re: Server Client connection Reply with quote

Partisan

Joined: 17 Aug 2002
Posts: 302

Code:

 MQCNO   cno = {MQCNO_DEFAULT}; 
 MQCD    cd  = {MQCD_CLIENT_CONN_DEFAULT}; 

  strncpy(cd.ChannelName,<Your_channel_Name>,MQ_CHANNEL_NAME_LENGTH);
   strncpy(cd.ConnectionName,<Your_Conn_Name>,MQ_CONN_NAME_LENGTH);
   cno.Version = MQCNO_VERSION_2;
   cno.ClientConnPtr = &cd;
 
   MQCONNX(QMName,
           &cno,
           &Hcon,
           &CompCode,
           &Reason);



Regards
Back to top
View user's profile Send private message
bsn
PostPosted: Mon Jun 05, 2006 3:49 am    Post subject: Reply with quote

Newbie

Joined: 01 Jun 2006
Posts: 5
Location: Bangalore

Thank you very much
Back to top
View user's profile Send private message
bsn
PostPosted: Tue Jun 06, 2006 6:50 am    Post subject: Server Client Connection Reply with quote

Newbie

Joined: 01 Jun 2006
Posts: 5
Location: Bangalore

Hi All,
What are the alteration that should be done for a get ( C ) program that runs on a client machine to get message from queue at the server.
I have tried I did in put program but it is not working.

Please post your replies.
Thanks in advance.
Back to top
View user's profile Send private message
wschutz
PostPosted: Tue Jun 06, 2006 6:59 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

The CNO structure has to be set to at least V2 ...

cno.Version = MQCNO_VERSION_2

see the sample amqscnxc.c

Quote:
I have tried I did in put program but it is not working
whats happening when you try and run it?
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
bsn
PostPosted: Tue Jun 06, 2006 10:57 pm    Post subject: Reply with quote

Newbie

Joined: 01 Jun 2006
Posts: 5
Location: Bangalore

Hi wschutz,

I got my mistakes and it is working fine.
Thank you for your kind help.

I was linking to both mqm.lib & mqic32.lib.It was not connectiong.
I removed mqm.lib from link library & it got connected to server queue.
Back to top
View user's profile Send private message
skiv
PostPosted: Mon Jul 10, 2006 6:50 pm    Post subject: Reply with quote

Apprentice

Joined: 19 Jun 2006
Posts: 33

Hi

May i ask if the client is in java, how can i set the MQCNO version and set the pointer for its securityptr?

thanks
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 » IBM MQ Telemetry / Low Latency Messaging / Everyplace » Server Client connection
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.