The comments section of the Knowledge Base is the wrong place for an extended discussion. Please raise this as a new topic an appropriate MF Community forum.
I'll be frank: It will be difficult to help you get this running if you don't have a solid understanding of basic Linux concepts. libdl.so is one such concept. So is the use of PATH and LD_LIBRARY_PATH. PATH is not used to search for shared objects, so there's no reason to be changing it. Adding random application directories (such as /Oracle/apps/...) to LD_LIBRARY_PATH is not likely to be productive; and now your script is resetting its entire value, so commenting out the unset command is pointless, and you've undone any changes that cobsetenv made to it.