script running by sh but not by bash

execute the attached script as,

bash -x INFA_MAP_GEN_XML.sh  "/export/home/e120945/INFORMATICA_MAPPING_GENERATOR/SOURCE" "INFA_TEMPLATE.csv" "/export/home/e120945/INFORMATICA_MAPPING_GENERATOR/TARGET" "UNIX" "/export/home/e120945/INFORMATICA_MAPPING_GENERATOR/SETUP" "/export/home/e120945/INFORMATICA_MAPPING_GENERATOR/SETUP/LOGFILE1"  "ISO8859-1"
 

and there will be error like "FLAG_TRANS_SOURCE_1: integer expression expected"

Why must you run it with bash if it was made to work in sh? Is it that it won't work on a machine that uses bash as sh? I'd almost want to completely rewrite something like this before feeding it to bash. The amount of evil (i mean eval) used in there, and using cat file | head | tail to grab each line rather than a while read loop... wow.

no one is going to want to maintain something like this.. delete it!

Can you explain the function of this script?

When you post an error message, please post the entire error message.

Please post the last 20 lines of the output from your bash -x .
This should show which line is producing the error.

There are several lines containing -eq -1 which only work in Shells which can deal with negative integer values. I don't know if yours is one of them.

it is an old script, just need it to run on Bash successfully.

the only error i am getting is "INFA_MAP_GEN_XML.sh: line 1117: [: FLAG_TRANS_SOURCE_1: integer expression expected".

pls. let me know if it can be rectified.

PFA the output that I get.

There are 375 "integer expression expected" errors in your sample bash log with 51 different variations.
That error message usually comes from the expr command but the log suggests that it is coming from if statements.

The script is virtually impossible to follow due to the use of eval commands, and made even more complicated by the use of functions (which may well behave differently in bash).

Short of a total rewrite, all I can suggest is testing line-by-line until the bad construct (or constructs) come to light.