May 2008  
   
Publishing Cobsql Applications to UNIX
When publishing Cobsql applications to UNIX, even if the Oracle environment is set up within the user’s .login/.profile etc., this may not get picked up correctly by the remote command.

This will lead to Cobsql attempting to invoke procob18 rather than procob, which will either fail (if Pro*COBOL 1.8.xxx was not installed) or invoke the wrong precompiler.

In order to resolve this follow the instructions documented in the UNIX Option User's Guide appendix on publishing Cobsql applications. Copy the created Makefile to CSQLMakefile, then add to the entries which create mfenv.sh as follows:

mfenv.sh

@echo "#!/bin/sh" > mfenv.sh

@echo "ORACLE_HOME=MY_ORACLE_HOME" >> mfenv.sh

@echo "export ORACLE_HOME" >> mfenv.sh

@echo "PATH=\$$ORACLE_HOME/bin:\$$PATH" >> mfenv.sh

@echo "export PATH" >> mfenv.sh

@echo "LD_LIBRARY_PATH=\$$ORACLE_HOME/LIBDIR:\$$LD_LIBRARY_PATH" >> mfenv.sh

@echo "export LD_LIBRARY_PATH" >> mfenv.sh

@echo "COBDIR=$(COBDIR)" >> mfenv.sh


Where

MY_ORACLE_HOME is the correct ORACLE_HOME directory on your target machine.

for LIBDIR: substitute lib/lib32/lib64 as appropriate.

for AIX and HP-UX PA-RISC 32-bit: substitute LD_LIBRARY_PATH for LIBPATH and SHLIB_PATH respectively.

Hence if publishing to Linux Intel, and Oracle's root is /home/oracle8/9.2.0 specify

mfenv.sh

@echo "#!/bin/sh" > mfenv.sh

@echo "ORACLE_HOME=/home/oracle8/9.2.0" >> mfenv.sh

@echo "export ORACLE_HOME" >> mfenv.sh

@echo "PATH=\$$ORACLE_HOME/bin:\$$PATH" >> mfenv.sh

@echo "export PATH" >> mfenv.sh

@echo "LD_LIBRARY_PATH=\$$ORACLE_HOME/lib:\$$LD_LIBRARY_PATH" >> mfenv.sh

@echo "export LD_LIBRARY_PATH" >> mfenv.sh

@echo "COBDIR=$(COBDIR)" >> mfenv.sh


NOTE:
  this is based on Knowledge Base article reference: 24403


Key highlights:
 
   
Micro Focus, Old Bath Road, Newbury, Berkshire, RG14 1QN, UK Tel: +44 (0) 1635 32646 E-mail: info@microfocus.com