Not all functions may be used in a model's constraints. Some functions, for example @WRITE, only make sense in and may only be used in calc and data sections. You will receive this error message if you attempt to use such functions in a model's constraints or objective function.