ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Having problem with the flow

Post new topic  Reply to topic
 Having problem with the flow « View previous topic :: View next topic » 
Author Message
sachinramesh
PostPosted: Thu May 22, 2008 3:44 am    Post subject: Having problem with the flow Reply with quote

Disciple

Joined: 20 Feb 2007
Posts: 170

Hi

I had problem when running my flow..

i have a tds message which is like this
My input is like this 1. no;name;area;country;
2.no;name;area;country;

But the value of "area" in the first record is 1,2,3,4,5;

in the next record it is 2,3,4,5;

in the code i am seperating the "area" value based on the Comma and storing it in the environment variable and inserting the data into the database.

But after debugging the flow i found that the first recordis inserted correctly
but when it comes to the next record i found that my variable gets replaced like this 2 with 1(in the first record)
3 with 2(in the first record)
4 with 3(in the first record)
5 with 4(in the first record)

But the 5 value is still remaining and is getting inserted into the database

This is my code for seperating the "area" value with the comma.


SET IN_I = 1;
WHILE ( CH_VIJETHA_AREA <> '' ) DO
-- find out the position of the separator in the 'AREA' field
SET IN_TEMP_POSTION_I = ( POSITION ( ',' IN CH_VIJETHA_AREA ) );
-- check if start of 'AREA' field
IF (IN_TEMP_POSTION_I <> '0') THEN
SET Environment.Variables.AREA_LIST[IN_I] = TRIM (SUBSTRING ( CH_VIJETHA_AREA FROM 1 FOR ( IN_TEMP_POSTION_I - 1 ) ) ) ;
SET CH_VIJETHA_AREA = SUBSTRING ( CH_VIJETHA_AREA FROM ( IN_TEMP_POSTION_I + 1 ) );
SET IN_I = IN_I + 1;
ELSE
SET Environment.Variables.AREA_LIST[IN_I] = TRIM ( CH_VIJETHA_AREA ) ;
SET CH_VIJETHA_AREA = '';
END IF;
END WHILE;
SET AREA_CARDINALITY = CARDINALITY(Environment.Variables.AREA_LIST[]);
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Thu May 22, 2008 3:52 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Stop!
Why are you writing ESQL to split up the comma-separated text? You already have a TDS message definition, so extend it to handle the comma-separated stuff.

If you need more help, please
- Post an example of your input message. ( your description was not clear )
- Describe any variations ( optional, repeating elements ). Use more than one example if you have to.
- Describe the message tree structure that you want the parser to produce.
- Use code tags to preserve the format
Back to top
View user's profile Send private message
sachinramesh
PostPosted: Thu May 22, 2008 4:19 am    Post subject: Reply with quote

Disciple

Joined: 20 Feb 2007
Posts: 170

kimbert wrote:
Stop!
Why are you writing ESQL to split up the comma-separated text? You already have a TDS message definition, so extend it to handle the comma-separated stuff.

If you need more help, please
- Post an example of your input message. ( your description was not clear )
- Describe any variations ( optional, repeating elements ). Use more than one example if you have to.
- Describe the message tree structure that you want the parser to produce.
- Use code tags to preserve the format



My input message looks like this

ACTVJ84865855;VIJ84865855;HPCMDR025,HPCDEL019,HPCDEL022;SUNSILK BLACK RE 1.00 5ML_8ML;11156;SUNSILK BLACK SHAMPOO SACHET RE.1;PP;HPC;1.0;CASE;13;GOLD;05/21/2008;06/20/2008;VIJETA_200508211206.xls;4,4,4;GT,GT,GT,--------> end of first record
ACTVJ84865856;VIJ84865856;HPCMDR025,HPCDEL019;SUNSILK T&L INR 1.00 (5 ML);11207;SUNSILK PINK SHAMPOO SACHET RE.1;PP;HPC;1.0;CASE;13;GOLD;05/21/2008;06/20/2008;VIJETA_200508211206.xls;4,4;GT,GT-------> end of 2nd record
ACTVJ84865857;VIJ84865857;HPCMDR025,;CLINIC PLUS SHAMPOO 3.5ML_4ML ( 50 PS );11046;CLINICPLUS SHAMPOO SACHET RE.0.50;PP;HPC;1.0;CASE;5;GOLD;05/21/2008;06/20/2008;VIJETA_200508211206.xls;4;GT--->end of third record


how do seperate the comma value of a particular field in the record in the message set without esql.

my message should look like this

After the record got processed the environment variable values of the area field (which i had seperated and stored)sholud be like this
1
2
3
4
5
and when the flow starts processing the next record the environment variable value of the area field sholu be null and it should only take the values freshly from the second record.(now it is replacing the values of the first record)
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Thu May 22, 2008 12:22 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
how do seperate the comma value of a particular field in the record in the message set without esql.

1. Create a message set with a TDS physical format.
2. Add a project reference from your message flow project to the message set project
3. In the input node of your message flow, set the parser to 'MRM' and the message set, message type and message format to appropriate values

If you create the message definition correctly the TDS parser will split up your fields for you. You should not put that logic into your message flow.
Please look in the Samples gallery for examples, or search this forum for 'TDS message set'. This is basic use of the product.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Having problem with the flow
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.