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 » General IBM MQ Support » MQFMT_STRING problem (C code)

Post new topic  Reply to topic
 MQFMT_STRING problem (C code) « View previous topic :: View next topic » 
Author Message
mq newguy
PostPosted: Mon Jul 01, 2002 8:44 am    Post subject: MQFMT_STRING problem (C code) Reply with quote

Newbie

Joined: 21 Jun 2002
Posts: 8

getting further...the mainframe program is getting all my messages from my C program on the as400 but it is getting an error of wrong format. they are using the convert in the GMO, and I never did set my MQMD.Format so I guess it defaults to NONE. anyway I wanted to add the line in. msgDesc.Format = MQFMT_STRING; but when im compiling it i keep getting this one error, and it adds in the line below it on 1347, tried that line but no luck--what am i doing wrong?? thanks
here is the spool file from the compilation

1347 | MsgDesc.Format = MQFMT_STRING;
1347 11 + MsgDesc.Format = "MQSTR ";
===========> ....a......................................................
*=ERROR===========> a - CZM0114 Operand must be a modifiable lvalue.
1348 12 | MsgDesc.Priority = 1;
1349 13 | MsgDesc.Persistence = MQPER_PERSISTENT;
Back to top
View user's profile Send private message
kolban
PostPosted: Mon Jul 01, 2002 9:06 am    Post subject: Reply with quote

Grand Master

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

Assuming C programming language ....

The definition of the MQMD structure Format field is usually

char Format[8];

This means that the field is an 8 byte character array. To set the value of this field to something, you can't simply assign it like a variable, instead, you must copy the contents of what you would like the format field to contain.

For example:

memcpy(Format, MQFMT_STRING, ;
Back to top
View user's profile Send private message
mq newguy
PostPosted: Thu Jul 11, 2002 6:42 am    Post subject: Reply with quote

Newbie

Joined: 21 Jun 2002
Posts: 8

Thanks alot. that helped alot. Im new to MQ programming and I havent done too much coding in C but thats what im asked to do right now, I prefer using java and my boss will likely let us in the future. I cant wait to learn all this MQ stuff in Java.

I will say the PCF command stuff is extremely hard to me and is way over my head right now. wish me luck
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 » General IBM MQ Support » MQFMT_STRING problem (C code)
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.