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 » Subsequent MQGET brings data in ASCII and not Ebcdic inCOBOL

Post new topic  Reply to topic
 Subsequent MQGET brings data in ASCII and not Ebcdic inCOBOL « View previous topic :: View next topic » 
Author Message
savere
PostPosted: Tue Jan 28, 2003 5:18 am    Post subject: Subsequent MQGET brings data in ASCII and not Ebcdic inCOBOL Reply with quote

Newbie

Joined: 11 Dec 2002
Posts: 3

I am issuing MQGET into area which has been GETMAIN prior.
After determinetion was made that MQ message requieres a larger buffer area(error code 2080). I perform FREEMAIN, SyncPoint ROLLBACK followed by GETMAIN for the length indicated by DATALEN and subsequent MQGET(trying get same message), at this point data is brought in ASCII format.

If I perform initial MQGET into large buffer area, data brought in EBCDIC format.
For initial and subsequent MQGET, I am using CONVERT, WAIT and FAIL-IF-QUIESCING option.

For initial and subsequent MQGET, I am NOT using message or correlid.

If any one has any idea, I would appreciate.

Thank You
Back to top
View user's profile Send private message Send e-mail
mrlinux
PostPosted: Tue Jan 28, 2003 7:43 am    Post subject: Reply with quote

Grand Master

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

Do the rest of the messages have the MQMD.Format field set to MQFMT_STRING ????
_________________
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
savere
PostPosted: Tue Jan 28, 2003 8:11 am    Post subject: Reply with quote

Newbie

Joined: 11 Dec 2002
Posts: 3

YES
Back to top
View user's profile Send private message Send e-mail
nimconsult
PostPosted: Tue Jan 28, 2003 11:25 pm    Post subject: Reply with quote

Master

Joined: 22 May 2002
Posts: 268
Location: NIMCONSULT - Belgium

Hi Savere,

When you retry a MQGET with a larger buffer, maybe you reuse the MQMD of the first MQGET which actually contains an ASCII CCSID, which is maybe why you retrieve an ASCII message on the second MQGET.

Make sure that CCSID and encoding are set to default of queue manager (or native I do not remember the terminology) before issuing MQGET.

Nicolas
_________________
Nicolas Maréchal
Senior Architect - Partner

NIMCONSULT Software Architecture Services (Belgium)
http://www.nimconsult.be
Back to top
View user's profile Send private message Send e-mail Visit poster's website
oz1ccg
PostPosted: Wed Jan 29, 2003 4:47 am    Post subject: Reply with quote

Yatiri

Joined: 10 Feb 2002
Posts: 628
Location: Denmark

Have you set the MQGMO correctly before second get, (including MQGMO-CONVERT) ? and not just added MQGMO-CONVERT once more...

I've seen it before...

Just my $0.02
_________________
Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
savere
PostPosted: Wed Jan 29, 2003 6:31 am    Post subject: Reply with quote

Newbie

Joined: 11 Dec 2002
Posts: 3

I was not sure which of the MQMD (in cobol) fields you are talking about, so I saved entire MQMD stracture.



A N D I T W O R K E D


THANK YOU



PS. Can You indicate a specific field in MQMD stracture ?

Thanx


Last edited by savere on Fri Jan 31, 2003 10:25 am; edited 2 times in total
Back to top
View user's profile Send private message Send e-mail
PeterPotkay
PostPosted: Wed Jan 29, 2003 4:24 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

Yes, look in the Application Programming Reference manual http://publibfp.boulder.ibm.com/epubs/html/csqzak06/csqzak06tfrm.htm under MQMD(Chapter 10). It tells you which fields on on MQGET or an MQPUT can be set, and which ones can only be read.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
nimconsult
PostPosted: Wed Jan 29, 2003 11:27 pm    Post subject: Reply with quote

Master

Joined: 22 May 2002
Posts: 268
Location: NIMCONSULT - Belgium

Glad to see that it worked.

The MQMD fields are most probably "Encoding" and/or "CodedCharSetId".

However I would recommend resetting the entire MQMD to all defaults, or use a plain new MQMD, instead of trying to reset individual attributes.

Nicolas
_________________
Nicolas Maréchal
Senior Architect - Partner

NIMCONSULT Software Architecture Services (Belgium)
http://www.nimconsult.be
Back to top
View user's profile Send private message Send e-mail Visit poster's website
EddieA
PostPosted: Fri Jan 31, 2003 10:08 am    Post subject: Reply with quote

Jedi

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

Here's a snippet from the sample amqsget:

/****************************************************************/
/* */
/* MQGET sets Encoding and CodedCharSetId to the values in */
/* the message returned, so these fields should be reset to */
/* the default values before every call, as MQGMO_CONVERT is */
/* specified. */
/* */
/****************************************************************/

md.Encoding = MQENC_NATIVE;
md.CodedCharSetId = MQCCSI_Q_MGR;

Read the provided samples. They contain a wealth of information.
_________________
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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Subsequent MQGET brings data in ASCII and not Ebcdic inCOBOL
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.