|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
End of Line Character |
« View previous topic :: View next topic » |
Author |
Message
|
AmitNy |
Posted: Sun Aug 04, 2002 8:13 am Post subject: End of Line Character |
|
|
Newbie
Joined: 27 Jul 2002 Posts: 5
|
Hi Friends,
I am trying to parse repeating records that are separated by <CTRLF> END of line Character. I am not sure what’s an similar character in MQSI.
I will highly appreciate, If anyone can help me .
Thanks
Regards |
|
Back to top |
|
 |
Tibor |
Posted: Sun Aug 04, 2002 11:27 pm Post subject: Re: End of Line Character |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
AmitNy wrote: |
I am trying to parse repeating records that are separated by <CTRLF> END of line Character. I am not sure what’s an similar character in MQSI. |
You should create a new Message and Type in your MessageSet with TDS layer. Simplest way is the "Create with Smartguide".
For example: Message name would be inFile, and create a string element named Line.
inFile:
- Properties
- Type Content: Closed
- Type Composition: Ordered Set / Sequence
- TDS layer
- Data Element Separation: All delemited
- Delimiter: <NUL> (or anyone else, because only one field)
Line:
- Connections
- Repeat: Yes
- TDS Layer
- Repeating Element Delimiter: <CR><LF>
- Length: (empty)
It's working with version 2.1 CSD02. |
|
Back to top |
|
 |
AmitNy |
Posted: Mon Aug 05, 2002 10:12 am Post subject: |
|
|
Newbie
Joined: 27 Jul 2002 Posts: 5
|
Hi
Thanks for response,
ActuallY I am getting data in form of String, and records in string are CRLF deliminated.
I am trying to do manual parsing and looking for CRLF.
Here's my code :
SET cflr1 = trim(CAST(x'0D0A' as CHAR CCSID 819));
SET POS = position(cflr1 in DATA1);
SET DATA1 = substring("InputBody".Generic.Data from 1 for POS );
but ITS not working. Any Inputs?
I am not sure, IS that right way..or any otherway, I can assign this data string directly to message set.
Thanks for your help ( PS i am in big prob) |
|
Back to top |
|
 |
Tibor |
Posted: Mon Aug 05, 2002 12:29 pm Post subject: |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
AmitNy wrote: |
Hi
ActuallY I am getting data in form of String, and records in string are CRLF deliminated.
|
OK, I don't know your environment, that's why I sent you a 'generic' MRM solution. I used it for parsing a "text file" with variable line length.
AmitNy wrote: |
I am trying to do manual parsing and looking for CRLF.
Here's my code :
SET cflr1 = trim(CAST(x'0D0A' as CHAR CCSID 819));
SET POS = position(cflr1 in DATA1);
SET DATA1 = substring("InputBody".Generic.Data from 1 for POS );
but ITS not working. Any Inputs?
|
Errrr... I don't understand it, because I try a similar function last Friday and worked fine . |
|
Back to top |
|
 |
seeknee |
Posted: Thu Aug 08, 2002 4:32 am Post subject: |
|
|
 Apprentice
Joined: 08 Aug 2002 Posts: 41 Location: Melbourne, Australia
|
Hi
Has the messages been through the XML Domain prior to looking for the
CRLF, If so they will have been turned into LF.
I had the same problem when reformatting SWIFT messages in MQSI/NEON.
I've got some code from IBM that fixed this problem but it was very slow,
I have since used the NEON Formatter to do this which is much quicker but not ideal.
Thanks |
|
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
|
|
|
|