Employee

[resolved] About the global variable NB_LINE in the component

Something need to pay attention when you use globalMap.get("*_NB_LINE").
eg, we have 2 global int variables: tFileInputDelimited_1_NB_LINE and tFileOutput_1_NB_LINE with the same value 125.
((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE")) == ((Integer)globalMap.get("tFileOutputDelmited_1_NB_LINE"))

The above expression will evaluate true. When the global int variable NB_LINE <=127, the above expression will evaluate true always.
But when NB_LINE >=128, the above expression will evaluate false.
Therefore, we'd better not using the above expression, here is suggestion to use the global variable as the following to avoid potential problems.
((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE")).intValue() == ((Integer)globalMap.get("tFileOutputDeimited_1_NB_LINE")).intValue()
1 REPLY
Moderator

Re: [resolved] About the global variable NB_LINE in the component

Hi Wliu,
Thanks for your information.

Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.