Hi Vika,
I think that we need a little bit more information here on what you are trying to do:
What operating system and language or application are you calling from? (you mention that the COBOL and DB2 are on an OS/390, is this where the application sits also?)
What 'function' are you trying to process in Cobol? And how does it interact with DB2? Also, is the Cobol program already written, or do you have to write it from scratch?
In short, let us know in a bit more detail what you already have got, and what you are trying to get to, and we will try to help.
Marc