Author |
Message
|
savere |
Posted: Tue Jan 28, 2003 5:18 am Post subject: Subsequent MQGET brings data in ASCII and not Ebcdic inCOBOL |
|
|
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 |
|
 |
mrlinux |
Posted: Tue Jan 28, 2003 7:43 am Post subject: |
|
|
 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 |
|
 |
savere |
Posted: Tue Jan 28, 2003 8:11 am Post subject: |
|
|
Newbie
Joined: 11 Dec 2002 Posts: 3
|
|
Back to top |
|
 |
nimconsult |
Posted: Tue Jan 28, 2003 11:25 pm Post subject: |
|
|
 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 |
|
 |
oz1ccg |
Posted: Wed Jan 29, 2003 4:47 am Post subject: |
|
|
 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 |
|
 |
savere |
Posted: Wed Jan 29, 2003 6:31 am Post subject: |
|
|
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 |
|
 |
PeterPotkay |
Posted: Wed Jan 29, 2003 4:24 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
|
Back to top |
|
 |
nimconsult |
Posted: Wed Jan 29, 2003 11:27 pm Post subject: |
|
|
 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 |
|
 |
EddieA |
Posted: Fri Jan 31, 2003 10:08 am Post subject: |
|
|
 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 |
|
 |
|