Author |
Message
|
sboucher |
Posted: Sat Feb 15, 2003 4:34 am Post subject: Removing Carriage Return and Line Feed (x0D0A) |
|
|
Acolyte
Joined: 27 Oct 2002 Posts: 52
|
I am receiving one large message comprised of many records. The last record of this message I'm receving consistently is blank and is created by a trailing CRLF (x0D0A).
Can MQSI test this record for x0D0A and strip it out.
Thanks _________________ Scott A. Boucher
Database Administartor |
|
Back to top |
|
 |
yaakovd |
Posted: Sat Feb 15, 2003 7:00 am Post subject: |
|
|
Partisan
Joined: 20 Jan 2003 Posts: 319 Location: Israel
|
1. Copy input bitstream to output bitstream "from 1 for length-4".
2. Or you can set last element as UNKNOWN.
But first solution can be done without parsing. _________________ Best regards.
Yaakov
SWG, IBM Commerce, Israel |
|
Back to top |
|
 |
sboucher |
Posted: Sat Feb 15, 2003 7:48 am Post subject: |
|
|
Acolyte
Joined: 27 Oct 2002 Posts: 52
|
Yaakov
I'm too new to MQSI to follow your solutions. Can you elaborate in more detail on your solution 1.
Is copy bitstream the same as setting InputRoot=OutputRoot. Where is this done. A Compute Node?? Where do you set the length.
Thanks _________________ Scott A. Boucher
Database Administartor |
|
Back to top |
|
 |
yaakovd |
Posted: Sat Feb 15, 2003 9:49 am Post subject: |
|
|
Partisan
Joined: 20 Jan 2003 Posts: 319 Location: Israel
|
1. Receive message as BLOB or reset to BLOB using Reset Content node
2. In compute node:
DECLARE I INTEGER;
DECLARE C INTEGER;
SET I = 1;
SET C = CARDINALITY(InputRoot.BLOB.*[]);
WHILE I <= C-4 DO
SET OutputRoot.BLOB.*[I] = InputRoot.BLOB.*[I];
SET I =I +1;
END WHILE;
3. Reset Content to needed format using Reset Content node. _________________ Best regards.
Yaakov
SWG, IBM Commerce, Israel |
|
Back to top |
|
 |
kirani |
Posted: Sat Feb 15, 2003 12:46 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Select Copy Message Headers only in a compute node.
Code: |
DECLARE MSGLEN INT;
SET MSGLEN = LENGTH(InputRoot."BLOB"."BLOB");
SET OutputRoot."BLOB"."BLOB" = SUBSTRING(InputRoot."BLOB"."BLOB" FROM 1 FOR MSGLEN - 2);
|
_________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
|