lol, that is a very accurate description of your problem. The same code will be a problem if one would be SQL and the other would be 4GL, don't you think so?
So may guess would be that since the SQL code works, you seem to have made a mistake with the 4GL code...
Casper.