|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MRM (Fixed Length) to Delimited. |
« View previous topic :: View next topic » |
Author |
Message
|
kirani |
Posted: Thu Jan 03, 2002 6:27 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Hi guys,
I have defined following messageset in MRM.
MessageSet: TestXML
Messages: c_struct_msg
Elements: Name (Type: String, Length:30)
Age (Type: Integer, Length:3)
'Name' field can have data upto 30 characters and 'Age' can be upto 3 digit numbers.
My input MRM message looks like this (there are 5 spaces before '025'),
ABCDEABCDEABCDEABCDEABCDE 025
I would like to generate following type of output message (remove leading spaces in 'Name' and add ',' delimiter),
ABCDEABCDEABCDEABCDEABCDE,025
I don't want to use NEON for getting this type of output message. Is there any other way (ESQL) to do this? I am using MQSI V2.0.2 on Windows 2000.
Your help is highly appreciated.
Regards,
Kiran
|
|
Back to top |
|
 |
harkink |
Posted: Fri Jan 04, 2002 4:13 am Post subject: |
|
|
Newbie
Joined: 02 Jan 2002 Posts: 4
|
You can use Trim to remove the spaces.
To format the output with the comma, I would suggest the TREEASIS node (IA05).
ESQL:
DECLARE delimiter CHAR;
SET delimiter = ',';
SET OutputRoot.TREEASIS.name= InputRoot.MRM.name || delimiter;
SET OutputRoot.TREEASIS.age=InputRoot.MRM.age
(This is just example, not tested) |
|
Back to top |
|
 |
kirani |
Posted: Fri Jan 04, 2002 6:42 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
harkink,
Thanks a lot! I was able to get desired output using TREEASIS parser.
Regards,
Kiran
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|