In this blog post, you’ll learn more about the Sybase Error Host variables must not be used within a batch and the reason for receiving this error
Sybase SQL Error Message
Host variables must not be used within a batch
Reason for this Error
You have attempted to execute a batch that contains host variable references. Host variables are not supported within a batch.