I would suggest posting this in the relevant language forum, as this does not seem to be a DB2 issue.
It appears to me as if you are asking 'in such and such a language, how do I convert a xxxx field to a zzzzz field'.
We are all happy to help, and have between us a pretty extensive knowledge of DB2 and numerous languages that interact with it, but I think you may need to be a little more specific with your question, or even post in a more relevant forum.
Apologies for not being able to be overly helpful.
Marc