The name variable-name appears in the parameter list of the FUNCTION statement for this function. However, it does not appear in a DEFINE statement within the function. All parameters must be defined in their function before use. Possibly you wrote a DEFINE statement but did not spell variable-name the same way in both places.