Please use ***
[code][/code]*** tags around your code and data, to preserve the original formatting and to improve readability. Do
not use quote tags, bolding, colors, "start/end" lines, or other creative techniques.
Code:
let ErrorNoteOid=$(AddErrorNote $TranId $MaxLineNo "$fLine")
Well, assuming that this line really is the culprit,
let initiates an arithmetic environment, so the right hand side needs to evaluate into a number. The "more tokens expected" error seems to indicate that it's not getting the proper number of arguments, so perhaps the AddErrorNote function isn't producing what it should. Have you tried echoing out the variables and testing the output of the function separately yet?
Other than that, it's impossible to say anything more with the meager amount of code and info you've given us.
BTW, it's generally recommended to use
((..)) or
$((..)) for your arithmetic expressions instead of
let.
Code:
(( ErrorNoteOid = $(AddErrorNote $TranId $MaxLineNo "$fLine") ))
ErrorNoteOid=$(( $(AddErrorNote $TranId $MaxLineNo "$fLine") ))