Global variable support and dynamic compound statement support were added to DB2 for i at 7.1.
Is the system itself still running v5r4? Or are you just running a back level version of Client Access? If the later, upgrade your IBM iAccess to 7.1. If the former, you're SOL until the system gets upgraded.