oh finally i have understood how does it works.
i have to use the original udf code either by copiing into the script or calling it with the call command.

this was the secret for me till yet.

thank you all!

frank