Um... okay, that code didn't really help at all, but it looks like you want to do what I'm taking about. I assume that you want _GAT to be assigned the value that is in the variable ind2, for example?
If so, you are on the right track. But you are just making a string out of _id and _i2, and putting that into _GAT. What you need to do looks like this:
call format ["_GAT = %1%2", _id, _i2]
That will make a string that would look like (for example):
"_GAT = ind2"
Then using the "call" command, you execute that string as though it were a line of script. HOWEVER, you must first create the variable _GAT, before you assign it a value in this way! So, depending on what value is supposed to go into _GAT, your first line could be something like:
_GAT = 0
_GAT = player
_GAT = ""
or maybe just this would work in all cases:
_GAT = null
Then you would do the rest:
call format ["_GAT = %1%2", _id, _i2]