Author |
Message
|
phanish |
Posted: Wed Jan 08, 2014 7:10 am Post subject: To send Ebcdic data barring few fields which are packed deci |
|
|
 Apprentice
Joined: 04 May 2013 Posts: 30
|
Hi,
I am stuck with an issue where in I have to outbound data in Ebcdic format barring few fields which are packed decimal, zoned integer and zoned decimal.
I Imported the cobol copy book in Binary CWF and I can see physical type as packed decimal for the fields which should be packed decimal in the Message set but for zoned integer/decimal fields physical type is as decimal.
rest of the fields I have to send it in ebcdic form. as of now I am casting as the below for the ebcidic fields
Code: |
SET target.MRM.PATH_OSHDR_DATA.PATH_OSHDR_OSLPR_COUNT = CAST(TRIM(source.XMLNSC.createEquipmentOrder.leaseSegmentCount) AS BLOB CCSID 37 ENCODING 785) |
and for non ebcdic fields I am mapping as
Code: |
SET target.MRM.PATH_OSHDR_DATA.PATH_OSHDR_OSLTYP = CAST(TRIM(source.XMLNSC.createEquipmentOrder.leaseTypeCode) AS BLOB CCSID 546 ENCODING 785); |
And I am seeing the error
"Text:CHARACTER:Error creating converter"
could you pls help me in resolving this and also I am unsure whether I am doing it in optimal way
[/code] |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jan 08, 2014 7:27 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Why are you using CAST to turn things into a BLOB and then assigning it to an MRM message tree? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
phanish |
Posted: Wed Jan 08, 2014 8:07 am Post subject: |
|
|
 Apprentice
Joined: 04 May 2013 Posts: 30
|
because when I just casted as it's original primitive type with ccsid as 37. I am seeing the output in ascii only and I dont see any ebcidic data in the output |
|
Back to top |
|
 |
phanish |
Posted: Wed Jan 08, 2014 10:11 am Post subject: |
|
|
 Apprentice
Joined: 04 May 2013 Posts: 30
|
is it possible to do field level casting into ebcdic and have the output domain as MRM? |
|
Back to top |
|
 |
kimbert |
Posted: Thu Jan 09, 2014 2:43 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Don't try to CAST to EBCDIC in your message flow! The message tree is a canonical representation of your data, and all text data is in UTF-16.
The WMB parser ( MRM in your case ) will cast to EBCDIC when it writes the text fields to the output. Just make sure that you set OutputRoot.Properties.CodedCharSetId correctly. _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jan 09, 2014 4:04 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kimbert wrote: |
Don't try to CAST to EBCDIC in your message flow! The message tree is a canonical representation of your data, and all text data is in UTF-16.
The WMB parser ( MRM in your case ) will cast to EBCDIC when it writes the text fields to the output. Just make sure that you set OutputRoot.Properties.CodedCharSetId correctly. |
It is for this point I asked the question above. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
phanish |
Posted: Fri Jan 10, 2014 3:03 am Post subject: |
|
|
 Apprentice
Joined: 04 May 2013 Posts: 30
|
In my case not all the fields are ebcdic, few fields are packed decimal and few are zoned integer, and my broker version is 7.0. Can you please suggest me how to handle this. |
|
Back to top |
|
 |
smdavies99 |
Posted: Fri Jan 10, 2014 4:51 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
All of your fields can be described on a Cobol Copy book.
google for
cobol zoned numeric
cobol packed decimal
Create a message model that properly describes your output and let the MRM parser work its magic for you. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
kimbert |
Posted: Fri Jan 10, 2014 5:13 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
not all the fields are ebcdic, few fields are packed decimal and few are zoned integer |
That's OK - the MRM parser knows which fields are text and which are non-text. It will only apply the EBCDIC encoding to the text fields.
Does that answer your concerns? _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
phanish |
Posted: Wed Jan 15, 2014 11:40 pm Post subject: |
|
|
 Apprentice
Joined: 04 May 2013 Posts: 30
|
thanks Kimbert.
I understood that even though we set the ccsid and encoding at message set level (OutputRoot.MQMD.CodedCharSetId=37), EBCDIC conversion is applicable only to the fields which are of character type and the packed decimal fields will remain non ebcdic. Infact this will meet my requirement.
could you please correct me if I am wrong. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Jan 16, 2014 2:24 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Your understanding is correct.
A message model can save you a lot of development time. It means that you can ignore the physical format of your data, and design your message flow to deal with the logical representation of the data. (Exactly what DOM does for XML).
If you are interested, you might like to download the free IIB v9 developer toolkit and experiment with the DFDL parser. _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
|