Hello and welcome to the forum,
Are you currently working for some company or attendending some training institution?
If yes, either will have standard compile processes for various combinations cobol/db2/cics.
Suggest you review these processes and learn how these processes are implemented on your system.
If you find something that is not clear, post what you found and your doubt. Someone here should be able to clarify.
Hope this helps,