Oh man,
I was over-engineering the whole thing. I just learned how to incorporate UDF's into my scripting.

Lonkero - Thanks for throwing UDF's at me - I had no idea how KIX handled FUNCTION statements - Now I do. I went to the UDF library and I'm amazed by the amount of work that has gone into building it. It makes KIX that mush more powerful.

Radimus & Sealeopard - Thanks for all of your help - Your suggestions got the wheels turning for me.