#!/bin/sh
########################################################################################################
# # Source borne shell env.This is required for crontab to work as bip.sh uses environmental variables.
########################################################################################################
. /.ss.sh
#######################################################################
# ORACLE/ARBOR ENVIRONMENT VARIABLE DECLARATION
#######################################################################
ORACLE_HOME=/var/opt/oracle/product/10g; export ORACLE_HOME
PATH=$PATH:$ORACLE_HOME/bin:/bin:/usr/bin; export PATH
ARBOR_USR=$ARBORDBU; export ARBORDBU
ARBOR_DB_PASSWD=`cat $ARBORDIR/.arborpw`; export ARBOR_DB_PASSWD
ORACLE_SID=$DSQUERY; export ORACLE_SID
#######################################################################
####MAIN SCRIPT
#######################################################################
today=`date "+%m-%d-%Y %H:%M:%S"`; export today
CUR_DIR=/arbor/prdqa_ac/scripts ; export CUR_DIR
SCRIPT_DIR=/arbor/integ_fx/scripts
LOG_FILE=$CUR_DIR/error.log; export LOG_FILE
# Direct script output to log
echo "SQLPLUS CONNECTION"
sqlplus -s $ARBOR_USR/$ARBOR_DB_PASSWD@$ORACLE_SID<<EOF>$CUR_DIR/sql_output.txt
set feedback off
set heading off
select distinct account_no from adj WHERE ADJ_TRANS_CODE=-2401 and request_status=1 and bill_ref_no=0
order by account_no;
EOF
if [ ! -s "$CUR_DIR/sql_output.txt" ]
then
echo "No account number for bad debt"
else
for i in `cat $CUR_DIR/sql_output.txt`
do
echo "bip $i is running"
sh $SCRIPT_DIR/bip.sh 01 0 $i > $CUR_DIR/bip_log_1.txt
sleep 200
done
fi
###Removing temporary log files generated
if [ -f "$CUR_DIR/bip_log_1.txt" ]
then
rm "$CUR_DIR/bip_log_1.txt"
echo "file bip__log_1.txt removed"
fi
if [ -f "$CUR_DIR/sql_output.txt" ]
then
rm "$CUR_DIR/sql_output.txt"
echo "sql_output.txt removed"
fi
rm $CUR_DIR/error.log
I am calling bip.sh(it is standardises script.bip.sh further calls a binary file called BIP in its procedure).When i m running the T_1.sh it throws an error
ld.so.1: BIP: fatal: librc.so: open failed: No such file or directory
Cause of this error is
This occurs if the environment variable LD_LIBRARY_PATH (Sun), is not set correctly. The value should be $COBDIR/lib:$LD_LIBRARY_PATH\
(or the appropriate variant) on Server Express $COBDIR/coblib:$LD_LIBRARY_PATH (or the appropriate variant) on Object COBOL Developer Suite.
Please provide me the solution.I am able to run this code in DEV environment but it is failing in QA environment
---------- Post updated at 12:41 PM ---------- Previous update was at 11:11 AM ----------
Why dont you export the LD_LIBRARY path within the bip.sh and try?
It is not a secure solution though. If you are on solaris, check ldconfig is available.
./BIP_BAD_DEBT_REVERSAL.sh: LD_LIBRARY_PATH=/arbor/prdqa_ac/site_specific/apits/javaclient/lib32:/app/tuxedo/tuxedo9.0_32/tuxedo9.0/
lib:/app/weblogic/bea-acprdqa/patch_weblogic910/profiles/default/native:/app/weblogic/bea-acprdqa/weblogic91/server/native/solaris/sparc:/app/weblogic/
bea-acprdqa/weblogic91/server/native/solaris/sparc/oci920_8:/var/opt/oracle/product/10g/lib:/arbor/3p/rosette/lib:/arbor/3p/ACE_wrappers/bin:/arbor/3p/python/
lib:/arbor/3p/perl/lib:/arbor/3p/xerces/lib:/arbor/3p/xalan/lib:/app/tuxedo/tuxedo9.0/lib:/arbor/prdqa_ac/configurator_fx_site/lib:/arbor/prdqa_ac/ordering_site/
lib:/arbor/prdqa_ac/bsdm_site/lib:/arbor/prdqa_ac/site_specific/lib:/arbor/prdqa_ac/arm_site/lib:/usr/java/jre/lib/sparcv9/server:/usr/java/jre/lib/sparcv9/server/..:
/lib:/arbor/3p/pgsql/lib:/arbor/prdqa_ac/opcntr/agent/libs:/arbor/prdqa_ac/opcntr/tools/apache/modules:/arbor/prdqa_ac/opcntr/cc/libs:/arbor/3p/apache/
lib:/arbor/3p/openssl/lib:/arbor/prdqa_ac/DataBlitz/lib:/lib:/usr/lib:/lib:/var/opt/oracle/product/10g/lib:/usr/cobol/lib:/arbor/prdqa_ac/workflow_site/lib:/arbor/prdqa_ac/
workpoint_site/lib:/arbor/prdqa_ac/inventory_site/
lib:/arbor/3p/quantum/v3.2/lib:/usr/local/
lib: is not an identifier
---------- Post updated at 05:55 PM ---------- Previous update was at 03:13 PM ----------
What has the dev box more than this one?
What part of server-express are you running or is it running?
What is the current value of your LD_LIBRARY_PATH ?
Dev-box LD_LIBRARY_PATH HAS MORE CONTENT.(I MESSAGED YOU THE content).
I am not aware of the server-express.How can i check it and what is it?
Current value of LD_LIBRARY_PATH (in QA) i have mentioned in my earlie post.Can you please see.
Can you tell what is exactly LD_LIBRARY_PATH .
My script in QA is also not able to take parameters at runtime while it takes it in DEV(thats not a big issue though).
---------- Post updated at 12:43 PM ---------- Previous update was at 12:42 PM ----------
It is through my mistake (accidentally closing your thread when I meant to subscribe to it) that you resorted to messaging vbe. For everyone's benefit you should post the contents of that message here. Thanks, and sorry about that
May I also suggest that instead of setting the Oracle environment yourself, you use the oraenv command. It also has something to add to LD_LIBRARY_PATH.
Yes, the suggestion to use oraenv was not intended as a solution to your problem, only to save you from caring about the technical details about the location of your databases software.
What is the value of COBDIR, and did you add it (+ /lib) to the library path? Does that library (librc.so) exist?
That it runs fine independently, but not in a script, suggests that you forgot to export a variable, or are using an alias defined in the parent shell.