Author |
Message
|
prasadpav |
Posted: Fri Sep 30, 2005 1:37 am Post subject: EBCDIC to ascii conversion |
|
|
 Centurion
Joined: 03 Oct 2004 Posts: 142
|
Hi,
I've a cobol copy book definition like this:
05 YBC002A-CANC-DESC PIC X(60).
05 YBC002A-INSTAL-AMT PIC 9(09)V9(2).
05 YBC002A-NCOLLDTE PIC 9(08 ).
There are other elements also, but they all fall under one of the above 3 declared data type definitions (X(60), 9(09)V9(2), 9(08 )).
In the message flow, i just do only message routing. I dont change anything in my message payload. So, to convert from EBCDIC to ASCII, do I still need to import my cobol copybook definition while creating message set for doing the conversion?
I tried creating a message set which accepts entire message as a string, I then used AsBitStream to change the CCSID. But, my payload is missing entirely. Also RFH2 headers are appearing in the payload.
Please help. Thanks in advance.
Prasad |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Sep 30, 2005 3:14 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
To convert from EBCDIC to ASCII... just let MQ do it. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
prasadpav |
Posted: Fri Sep 30, 2005 3:22 am Post subject: |
|
|
 Centurion
Joined: 03 Oct 2004 Posts: 142
|
I can't use MQ conversion because i get the z/OS file to message broker via FTP. My FTPServer node will get the message and hence conversion from EBCDIC to ASCII must take place in message broker. Also, the client to whom we are working for, their standards says that we should not use any of the MQ message conversions, instead it must be done in message broker. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Sep 30, 2005 3:26 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I think you will have to manipulate the bytes.
Changing the CCSID doesn't change the data. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
prasadpav |
Posted: Fri Sep 30, 2005 4:24 am Post subject: |
|
|
 Centurion
Joined: 03 Oct 2004 Posts: 142
|
And do I need to import cobol copybook into message set in order to do the conversion? |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Sep 30, 2005 4:28 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Okay. Hang on. I should have waited for my coffee before posting.
If you do import the copy book, and model the data. THEN, broker will convert the data into Unicode in the logical message tree. And then when you set the OutputRoot.Properties.CCSID before you go to an MQOutput node, then broker WILL convert the bytes.
You should also be able to model this as a single string, as you tried to do. Then, again, don't use ASBITSTREAM, just change the Properties to set a different CCSID and see what happens when you output the message to a queue. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
prasadpav |
Posted: Sun Oct 02, 2005 1:42 am Post subject: |
|
|
 Centurion
Joined: 03 Oct 2004 Posts: 142
|
Yes, it worked, Thanks !!!!!!!  |
|
Back to top |
|
 |
|