Author |
Message
|
prakash27 |
Posted: Mon Sep 26, 2011 11:30 am Post subject: CCSID ERROR |
|
|
Novice
Joined: 15 Feb 2011 Posts: 20
|
HI,
I am trying to pass the data that is coming from windows with CCSID 437 and encoding 273 to a mainframe by setting outputproperties as
SET OutputRoot.Properties.CodedCharSetId = 500;
SET OutputRoot.Properties.Encoding = 785;
and MQMD as
SET OutputRoot.MQMD.CodedCharSetId = 500;
SET OutputRoot.MQMD.Encoding = 785;
when i borwse the queue on mainframe QMGR data section has all special characters...
any help or suggestions ?? |
|
Back to top |
|
 |
Vitor |
Posted: Mon Sep 26, 2011 11:50 am Post subject: Re: CCSID ERROR |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
prakash27 wrote: |
any help or suggestions ?? |
Does whatever you're using to do the browse call for conversion? Is it set on the channel?
Does the MQMD indicate it's a string? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
prakash27 |
Posted: Mon Sep 26, 2011 12:28 pm Post subject: |
|
|
Novice
Joined: 15 Feb 2011 Posts: 20
|
Thank you for your response.
Yes i did set the MQMD format to srting
SET OutputRoot.MQMD.Format = 'MQSTR'; |
|
Back to top |
|
 |
Vitor |
Posted: Mon Sep 26, 2011 12:31 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
prakash27 wrote: |
SET OutputRoot.MQMD.Format = 'MQSTR'; |
Pedantically that's not the value; it has spaces at the end. It's best practice to use the supplied constants rather than hard coded values, though this isn't going to be your problem.
How about my other questions? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
prakash27 |
Posted: Mon Sep 26, 2011 12:41 pm Post subject: |
|
|
Novice
Joined: 15 Feb 2011 Posts: 20
|
I dont think the browsing application is doing the conversion. Even mainfarame application also getting data as special characters.
FYI: i have some other flows( which are not passthrough) which are running on the same MQMD properties for them there is no problem with data. mainframe is getting data as expected.
i am getting this special characters only incase of passthrough flow.
CREATE PROCEDURE routeToDEST() BEGIN
SET OutputRoot.Properties = InputRoot.Properties;
SET OutputRoot.Properties.CodedCharSetId = 500;
SET OutputRoot.Properties.Encoding = 785;
SET OutputRoot.MQMD.Format = 'MQSTR';
SET OutputRoot.MQMD.CodedCharSetId = 500;
SET OutputRoot.MQMD.Encoding = 785;
SET OutputRoot.BLOB.BLOB =InputRoot.BLOB.BLOB |
|
Back to top |
|
 |
prakash27 |
Posted: Mon Sep 26, 2011 12:44 pm Post subject: |
|
|
Novice
Joined: 15 Feb 2011 Posts: 20
|
Sorry the above post does not contain complete ESQL code for the procedure am using
Below is the complete ESQL code that i am using in my code
CREATE PROCEDURE routeToDEST() BEGIN
SET OutputRoot.Properties = InputRoot.Properties;
SET OutputRoot.Properties.CodedCharSetId = 500;
SET OutputRoot.Properties.Encoding = 785;
SET OutputRoot.MQMD.Format = 'MQSTR';
SET OutputRoot.MQMD.CodedCharSetId = 500;
SET OutputRoot.MQMD.Encoding = 785;
SET OutputRoot.BLOB.BLOB =InputRoot.BLOB.BLOB
SET InputLocalEnvironment.Destination.RouterList = NULL;
SETInputLocalEnvironment.Destination.RouterList.DestinationData.labelName = 'TO_MAINFRAME';
this is a just passthrough no validations required.
Do i need to change any code in the above procedure??
Thnx in advance |
|
Back to top |
|
 |
Vitor |
Posted: Mon Sep 26, 2011 12:48 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
prakash27 wrote: |
I dont think the browsing application is doing the conversion. Even mainfarame application also getting data as special characters. |
If the browsing application (or the actual application) doesn't call for WMQ to convert the data (which is not the same as the application doing the conversion), and nothing in WMQ is set to automatically perform the conversion then this is why the data is not being converted.
But more importantly for you, the MQMD describes the actual content of the data, it's actual encoding. So:
prakash27 wrote: |
FYI: i have some other flows( which are not passthrough) which are running on the same MQMD properties for them there is no problem with data. mainframe is getting data as expected.
i am getting this special characters only incase of passthrough flow.
CREATE PROCEDURE routeToDEST() BEGIN
SET OutputRoot.Properties = InputRoot.Properties;
SET OutputRoot.Properties.CodedCharSetId = 500;
SET OutputRoot.Properties.Encoding = 785;
SET OutputRoot.MQMD.Format = 'MQSTR';
SET OutputRoot.MQMD.CodedCharSetId = 500;
SET OutputRoot.MQMD.Encoding = 785;
SET OutputRoot.BLOB.BLOB =InputRoot.BLOB.BLOB |
So what you're finding is that if you get WMB to process the data (i.e. parse it, look at it and write it out) it's working. If you use the code above and take the raw CCSID 437 data as a BLOB, drop it into the output message and change the CCSID in the MQMD to 500 even though the BLOB is still 437 it doesn't magically become CCSID 500.
I think I've found your problem. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
prakash27 |
Posted: Mon Sep 26, 2011 12:59 pm Post subject: |
|
|
Novice
Joined: 15 Feb 2011 Posts: 20
|
Any suggestion on what code need to be changed in above procedure so that mainframe can receive the data as CCSID 500 |
|
Back to top |
|
 |
Vitor |
Posted: Mon Sep 26, 2011 1:03 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
prakash27 wrote: |
Any suggestion on what code need to be changed in above procedure so that mainframe can receive the data as CCSID 500 |
The part where you're dumping the 437-encoded data into the output as a BLOB the broker doesn't examine, parse, convert or even look at. Just setting the CCSID to 500 doesn't change the message content into that any more than glueing a Toyota badge on the front of my Ford makes it a Toyota.
Of course, if the data doesn't need to be transfomed (i.e. the mainframe application can read it directly provided it's in 500 not 437) then you could fix your problem by removing the line where you set the CCSID to 500..... _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
prakash27 |
Posted: Mon Sep 26, 2011 1:31 pm Post subject: |
|
|
Novice
Joined: 15 Feb 2011 Posts: 20
|
by default Mainframe is set to read data using 500. and i am getting this error for passthrough interfaces only. it is working fine with other flows. |
|
Back to top |
|
 |
rekarm01 |
Posted: Mon Sep 26, 2011 11:42 pm Post subject: Re: CCSID ERROR |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
prakash27 wrote: |
Code: |
SET OutputRoot.BLOB.BLOB=InputRoot.BLOB.BLOB; |
Do i need to change any code in the above procedure?? |
The non-BLOB parsers use the input ccsid to convert character data in the input message from bytes to CHARACTER, and use the output ccsid to convert character data in the output message from CHARACTER to bytes.
The BLOB parser doesn't do any of that. Either enable conversion in the MQInput node, or use explicit CASTs to convert the data, or use one of the non-BLOB parsers. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Sep 27, 2011 4:54 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
prakash27 wrote: |
by default Mainframe is set to read data using 500. |
Yes, and if the structure of the data is correct the mainframe app can request that it be given your 437 encoded message in 500. This would remove the need for any broker intervention. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|