I have a small message flow requirement to be done in WBIMB 5.
1. I have to take data from Input Queue (in TDS format) and I have a
database where codes are stored in a DB2 table .
2.I have to query(SQL SELECT) all these codes stored in table . This
will fetch multiple values.
3. Then I have to add a value called IN.1(which are queue names for
different codes) to end of each of these codes retrieved from
database.Then the message is to be put into these different queues.

Say for example I have retrieved A and B from database I have to make
A.IN.1 and B.IN.1 .These are local queues where final TDS message has
to be put.
am using compute node to retrieve data using ESQL.I am writing a query
to retrieve codes,names which always fetches multiple results since
there are more than one code.
But my doubt is how to include the result from query in my message
flow. Now after fetching result say there are 10 entries,
I have to loop ten times to append code1.IN.1 , code2.IN.1 etc which is
output queue name for each code.The message has to be finally put into
this queue.

SET Environment.Variables.Result[] = (SELECT T.CD ,T.NAME FROM
Database.CODES as T);
SET i=1;

FOR result AS Environment.Variables.Result[] DO
SET OutputLocalEnvironment.Destination.MQ.DestinationD ata[i].queueName=
result.Code || '.IN.1' ;

SET OutputRoot.MRM.Details.Result[i].CD=result.CD;
SET OutputRoot.MRM.Details.Result[i].NAME=result.NAME;
SET i=i+1;

thanks ,