Use GlobalMap.get

Hello,
In a "tAs400Input", I have "select max(a) as toto from table" and row connection with a "tSetGlobalVar".
(Key: "abc" and Value: "row4.toto")---> test with tlogrow: OK !!!

I try after in tmap: (Integer)globalMap.get("abc")
The error message is: "Convert impossible Object to float"

what is wrong ?
4 REPLIES

Re: Use GlobalMap.get

tLogRow would cast your value to String - no problem there
but when trying to cast (keyword here is CAST) it fails.
so could you tell what is the data type of your 'abc' variable?

Re: Use GlobalMap.get

Nicolas,
'abc' is a string
In 'tSetGlobalVar', 'abc' is the name of my variable ?

Re: Use GlobalMap.get

Seven Stars

Re: Use GlobalMap.get

It looks like you included the double-quotes in setting Value, which stores the words "row4.toto" into the globalMap rather than the value of that field from the row!
All tLogRow shows is the values of the flow going into tSetGlobalVar, not what tSetGlobalVar has actually done. To test, use tJavaRow with: System.out.println(globalMap.get("abc"));