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 » EVAL Function

Post new topic  Reply to topic
 EVAL Function « View previous topic :: View next topic » 
Author Message
kishankumar.v
PostPosted: Wed Jan 23, 2002 12:09 am    Post subject: Reply with quote

Apprentice

Joined: 26 Nov 2001
Posts: 47

Hi,
1.
EVAL('SET OutputRoot.XML.'||OutputDestinationList.ColumnMap[1].CMSNAME||' = InputRoot.XML.sname;');
Gives "Expected comment or processing instruction" XML Parser error. Could not comprehend what it is.

2.
WHILE J <= 3 DO
EVAL('SET OutputRoot.XML.' || OutputDestinationList.columnMap[J].CMSNAME || ' = InputBody.' ||OutputDestinationList.columnMap[J].SBLNAME||';');
END WHILE
This is not giving any output. But Iam sure OutputDestinationList contains values which I printed in a trace file.

3.
How to do a trace while inside the compute node....say I want to store the temporary variables in the compute node in a file.

4.
I want to have the output of eval function to be assigned to a path...say
SET OutputRoot.XML.check1 = EVAL('SET OutputRoot.XML.'||variable||' = InputBody.sname;');
This gives out a error..what I want to check is whether the concatenation is proper or not...I need somethig like
SET OutputRoot.XML.check1 = 'SET OutputRoot.XML.secondname = InputBody.sname;';
How it is possible using eval funtion.

Rather a set of doubts..But all are linked to the EVAL function.
Please let me know the solutions.

Regards,
Kishan


Back to top
View user's profile Send private message Send e-mail
mpuetz
PostPosted: Wed Jan 23, 2002 5:21 am    Post subject: Reply with quote

Centurion

Joined: 05 Jul 2001
Posts: 149
Location: IBM/Central WebSphere Services

Hi Kishan,

1. and 2.)

Is this a deployement or runtime error ? Your next post with the
exception list indicates runtime, right ?

The exceptionlist in your case can be interpreted as follows
don't know about the first insert
1 in second insert : line number
23 in third insert : column number
fourth insert: description of error
fifth: could be token it was currently parsing

it probably means your string executed in the eval statement is incorrect
at position 23, which would mean your CMSNAME contains bogus.
Maybe leading blanks or you didn't set the OutputDestinationList
within the same Node and forgot SET InputDestinationList = OutputDestinationList
in the beginning.

3. you can't. Use debug trace level and learn to read debug trace files
from your runs. This skill will save your sanity .

4. Always include the complete statement within the EVAL string not
just a partial one (I know it sometimes works for partial ones,
too, but this is not very reliable).

Also, I'm confused by your example: the SET function in your EVAL
doesn't return a value which could assigned to something




_________________
Mathias Puetz

IBM/Central WebSphere Services
WebSphere Business Integration Specialist
Back to top
View user's profile Send private message
kishankumar.v
PostPosted: Wed Jan 23, 2002 11:11 am    Post subject: Reply with quote

Apprentice

Joined: 26 Nov 2001
Posts: 47

Hi,
Please look at the code below..

SET OutputDestinationList.ColumnMap[] = (SELECT RTRIM(A.SBLNAME)AS SBLNAME,RTRIM(A.CMSNAME) AS CMSNAME FROM Database.SBLCMS AS A WHERE A.TABLE_ID = '1');
DECLARE J INTEGER;
SET J = 1;
WHILE J <= CARDINALITY(OutputDestinationList.ColumnMap[]) DO
EVAL('SET OutputRoot.XML.'||OutputDestinationList.ColumnMap[J].CMSNAME||' = InputRoot.XML.'||OutputDestinationList.ColumnMap[J].SBLNAME||';');
END WHILE;

Here Iam trying to attach the XML tags from the database.
THe outputDestinationList is filled with
ColumnMap[1]
SBLNAME = 'fname '
CMSNAME = 'firstname '
ColumnMap[2]
SBLNAME = 'sname '
CMSNAME = 'secondname '
ColumnMap[3]
SBLNAME = 'eno '
CMSNAME = 'empno '

But the above code results in a error ...
Text = 'XML Parsing Errors have occurred'
Text = 'An error has been reported by the BIPXML4C component.'
Type = 2
(0x3000000)Text = '1'
Type = 2
(0x3000000)Text = '21'
)
(0x1000000)Insert = (
(0x3000000)Type = 5
(0x3000000)Text = 'Expected comment or processing instruction'
)
(0x1000000)Insert = (
(0x3000000)Type = 5
(0x3000000)Text = 'XML'

Please suggest what Iam missing. Its been a very long effort to resolve this without success.

Regards,
Kishan

Back to top
View user's profile Send private message Send e-mail
kishankumar.v
PostPosted: Wed Jan 23, 2002 11:21 am    Post subject: Reply with quote

Apprentice

Joined: 26 Nov 2001
Posts: 47

Hi,
Actually I did not check after writing RTRIM....before that the values in destinationlist contained spaces after the value which did not come in the above post...I think all spaces are bing truncated.
Will the above syntax of RTRIM will work? and is the error really concerns that?

Regards,
Kishan
Back to top
View user's profile Send private message Send e-mail
mpuetz
PostPosted: Wed Jan 23, 2002 3:22 pm    Post subject: Reply with quote

Centurion

Joined: 05 Jul 2001
Posts: 149
Location: IBM/Central WebSphere Services

Hi Kishan,

the code looks good, as far as I can tell.
I'm still suspicious thought about your DB
to fill the DestinationList.
What also makes me suspicious is the fact that you
get a parser error ? You should only get that
when your XML message is bogus. Are you sure the
message you put into the flow is valid XML ?
Maybe you were on the wrong track at all ?

If that is ok,
you can put the SELECT statement into a separate
compute node, with only Destination selected in the
Advanced tab.
Then put a trace node behind it printing the DestinationList
*and* Root to a file.
Then connect your old compute node with the XML mapping
putting a SET OutputDestinationList = InputDestinationList;
in front of your mapping loop.

That way you can make sure that your DestinationList
contains the correct values by verifying that they
show up in the trace file. Post the trace file in the
forum if you can't make sense of it.
How is your database table SBLCMS defined (data types) ?



_________________
Mathias Puetz

IBM/Central WebSphere Services
WebSphere Business Integration Specialist
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 » EVAL Function
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.