Glad you got it working.
Another idea crossed my mind (I haven't tested it, though):
If you're using a temporary .DBC you could use APPEND PROCEDURES to add your code as a stored procedure. However you'd need to COMPILE DATABASE to compile them; I'm not sure if that command is available in the runtime.
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up