Author |
Message
|
Ajit |
Posted: Wed May 05, 2004 2:04 am Post subject: How to strip off some bytes from the o/p MRM message |
|
|
Newbie
Joined: 14 Apr 2004 Posts: 8
|
I want to build an XML-to-MRM flow and I want to strip off initial few bytes from the message and then put the remaining message onto the output queue. Can anybody let me know if there is any ESQL function which will help me achieve this? Or any other alternative to achieve this?
Thanks,
Ajit. |
|
Back to top |
|
 |
Missam |
Posted: Wed May 05, 2004 5:44 am Post subject: |
|
|
Chevalier
Joined: 16 Oct 2003 Posts: 424
|
You can Strip Off what ever data you want ,but the thing is when you are writing to output queue,it should match your MRM message definition.
If you want to strip off initial few bytes from the MRM Message.you need to change your Message(MRM),remove those fields you don't want and remove those SQL SET statements for those Elements. |
|
Back to top |
|
 |
fschofer |
Posted: Wed May 05, 2004 7:10 am Post subject: |
|
|
 Knight
Joined: 02 Jul 2001 Posts: 524 Location: Mainz, Germany
|
Hi,
you can "force" the conversion of your MRM to BLOB by
adding a ResetContentDescriptor Node after your Compute Node.
Note, the reserialisation will not take place until you try to access the BLOB part of your tree.
This happens for example
- when your message reaches a MQOutput Node
- when a trace node tries to print the BLOB part to the trace
- when you access InputRoot.BLOB in a Compute Node
When you have your message as a BLOB you can copy a
piece from InputRoot.BLOB and put it in OutputRoot.BLOB by
using the SUBSTRING function.
Greetings
Frank |
|
Back to top |
|
 |
Ajit |
Posted: Wed May 05, 2004 7:22 am Post subject: |
|
|
Newbie
Joined: 14 Apr 2004 Posts: 8
|
The thing is like I have one field in my copybook(that need to be there) but it should not be there in the output message. For example, I have copybook something like this:
01 MAIN-RECORD.
05 COUNT PIC 9(2).
05 DETAIL-RECORD OCCURS FROM 1 TO 20 TIMES DEPENDING ON COUNT.
10 DETAIL-RECORD-FIELD-1 PIC X(10).
10 DETAIL-RECORD-FIELD-2 PIC X(10).
Now, I need to have the COUNT field as the OCCURS clause needs it. But still this field is not expected by the application that reads my o/p queue.
This is the reason I need to strip of these 2 bytes from my output message. Any way out to do this using ESQL in the same COMPUTE node that converts from XML to MRM ?
~Ajit. |
|
Back to top |
|
 |
Missam |
Posted: Wed May 05, 2004 8:05 am Post subject: |
|
|
Chevalier
Joined: 16 Oct 2003 Posts: 424
|
This is requirements issue.you can't say that this is my cobol cpy format and i don't want some of the elements in that.you may need to update cpy.or you can manually remove that count element from the Compound Type and remove the ESQL statement corresponding to that Element from the Compute Node. |
|
Back to top |
|
 |
|