HELP: Dynamic queue creation
Hi All, I want to create a queue dynamically and delete the same queue after the usage. Can you please tell me how to do that with MQI? Thanks MUrugesan Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com Archive: http://vm.akh-wien.ac.at/MQSeries.archive
HELP MQI MQOPEN
Hi, I am trying to open the queue in both input and output mode. The requirement is, i should be able to send receive messages and inquire the queue. l_Option = MQOO_OUTPUT + MQOO_INQUIRE+ MQOO_INPUT_AS_Q_DEF; MQOPEN(m_hConnection, obj_Od,l_Option, m_hObject, l_Opencode, l_Reason); Here i am able to send the message, but the MQGET returns reason code 2037(MQRC_NOT_OPEN_FOR_INPUT) Can you please tell me how to open the queue with the above three options? Thanks in Advance Murugesan Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com Archive: http://vm.akh-wien.ac.at/MQSeries.archive
MQI MQCONN call error
Hi All, I am developing MQ Clinent application on VMS in C. IBM MQServer is running on windows. i define the environment MQSERVER variable. $define MQSERVER S_tcp/tcp/206.54.39.67 When i run this program on VMS i got the reason code 2058. the same programe working in window fine. what error is it ? Kindly help me -Murugesan #include stdio.h #include stdlib.h #include string.h #include cmqc.h int main(int argc, char **argv) { MQOD od = {MQOD_DEFAULT}; MQMD md = {MQMD_DEFAULT}; MQPMO pmo = {MQPMO_DEFAULT}; MQHCONN Hcon; MQHOBJ Hobj; MQLONG O_options; MQLONG C_options; MQLONG CompCode; MQLONG OpenCode; MQLONG Reason; MQLONG CReason; MQLONG messlen; char buffer[100]; char QMName[50]; strcpy(QMName, QM_tcp); MQCONN(QMName, Hcon, CompCode, CReason); printf(MQCONN reason code %ld \n CompCode: %d \n, CReason,CompCode); } Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com Archive: http://vm.akh-wien.ac.at/MQSeries.archive
HELP: MQCONN
Hi all I am writing MQSeries application in C++ using MQI (that s the requirement). I have written my own wrapper function Open() This function uses MQCONN and MQOPEN calls. int MQICommunication::Open( const char* pszQueueName, int mode) { } The Close function uses MQCLOSE and MQDISC. int MQICommunication::Close() { } I created two instance of the class MQICommunication. MQICommunication c1,c2; Both c1 c2 connected to the MQ manager and Queue, able to send receive messages. When i call c1.Close() the c1 c2 got disconnected. It returns the Reason code 2018. I need c1.Close() should not affect the c2 object connection. I think the connection is shared. How to create independent connection and solve this problem? Thanks in advance Murugesan Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com Archive: http://vm.akh-wien.ac.at/MQSeries.archive
AMI vs MQI
Hi All, I need help in implementing publisher/subscriber model with MQI. The scenario is, The Client will be posting message using publisher/subscriber model with AMI (in WINDOWS system). On the other hand my server application picks up the messages using MQI (in Open VMS Alpha System), process the message and post the message to the queue on some particular topic. Wanted to know How to do the publisher/subscriber model with MQI. Could you please anyone send me the documents, which talks about publisher/subscriber in MQI? or anything related to that? Thanks in Advance Murugesan Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com Archive: http://vm.akh-wien.ac.at/MQSeries.archive
Re: HELP : Getting particular messages
Hi Dave Awerbuch, You are absolutely right. Thanks for your help. Murugesan -Original Message- From: David Awerbuch [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 16, 2003 11:54 PM To: [EMAIL PROTECTED] Subject: Re: HELP : Getting particular messages Murugesan, Just from the code snippet you included, I can tell you immediately what the problem is. Your memcpy() operation memcpy(md.CorrelId, COR1, sizeof(md.CorrelId)); is copying more data than the 4 bytes of the correlation ID you specified. The sizeof() operator is telling memcpy() to copy 24 bytes (MQBYTE24) from the source to the destination; 24 bytes is the actual size of the CorrelID field. Remember, in the C language, COR1 becomes a pointer to a null-terminated string in the static data area. The memcpy() function does not stop copying at the null terminator (you would have to use strcpy() or strncpy()), but copies the 24 bytes that are pointed to by the static pointer. So, in this case, you are copying the string COR1\0???, where '?' represents any valid binary byte value. Change it to either memcpy(md.CorrelId, COR1, strlen(COR1)); or strcpy(md.CorrelId, COR1); /* MQAPI automatically ignores data after the NULL terminator in the CorrelID field */ or strncpy(md.CorrelId, COR1, sizeof(md.CorrelId)); /* strncpy will stop copying when it hits the NULL in source field, or when it copies all 24 bytes */ Good luck, Dave Awerbuch IBM Certified MQSeries Specialist mailto:[EMAIL PROTECTED] - original message - Date: Thu, 16 Jan 2003 10:31:23 +0530 From: Murugesan Ravuthan [EMAIL PROTECTED] Subject: HELP : Getting particular messages Hi all, Let me explain the scenario I have 3 MQ series client. All 3 clients post the messages on the same queue . The idea is, whoever posted the message only they should get the response for that message. To do that I group the messages by CorrelId, For Client1 the CorrelId is COR1 Client2 the CorrelId is COR2 When is call MQGET function I should only the messages which are matching The CorrelId. This block of code is for getting message from Q. memcpy(md.MsgId,MQMI_NONE, sizeof(md.MsgId)); memcpy(md.CorrelId, COR1, sizeof(md.CorrelId)); memcpy(md.GroupId,MQMI_NONE , sizeof(md.GroupId)); md.Encoding = MQENC_NATIVE; md.CodedCharSetId = MQCCSI_Q_MGR; md.Version = MQMD_VERSION_2; gmo.Version = MQGMO_VERSION_2; gmo.MatchOptions = MQMO_MATCH_CORREL_ID ; gmo.WaitInterval = 11000; MQGET(Hcon,/* connection handle */ Hobj,/* object handle */ md, /* message descriptor*/ gmo,/* get message options */ buflen, /* buffer length */ buffer, /* message buffer*/ messlen,/* message length*/ CompCode, /* completion code */ Reason);/* reason code */ The MQGET just returned with out any error. It could not find the matching CorrelId I have attched the those 2 files which put the message and get the message. Waiting for ur response Thanks in Advance Murugesan __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com Archive: http://vm.akh-wien.ac.at/MQSeries.archive Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com Archive: http://vm.akh-wien.ac.at/MQSeries.archive
Help need for building the IBM Mqseries client application!!!
Hi all, I got some problem in writing MQseries client application. Let me explain what i have done. IBM Mqseries server is running on windows 2000 machine. Mqseries client application is running on Open VMS. I tried to connect with Mqserver from VMS thru the sample program given by IBM ( u can find /tool/c/samples/amqsput0.c) I compiled linked this file, $CC/INCLUDE_DIRECTORY=MQS_INCLUDE AMQSPUT0 $LINK AMQSPUT0.OBJ,SYS$INPUT/OPTIONS SYS$SHARE:MQM/SHAREABLE Ctrl +Z AMQSPUT0.exe is created I set the environment variable $Define MQSERVER S_tcp/TCP/207.153.39.43 in the program AMQSPUT0.c I hardcoded the QM_NAME and Q_name instead of passing to command line argument $Run AMQSPUT0 I got the following error $ run amqsput0 MQCONN ended with reason code 2059 When I execute this program in windows2000 system I am able to connect to the Queue and post and get messages Can any one tell me where I am making mistake? Thanks Murugesan Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com Archive: http://vm.akh-wien.ac.at/MQSeries.archive