Gurus,
I have the code below that reads a row from an Oracle database and then sets a variable with the results. It works great when I run it from the $ prompt, but, when we schedule it through the Maestro scheduler, I get the following errors:
/beta/nwdw/salesmi/bin/NDWY9017.sh: [[: not found
/beta/nwdw/salesmi/bin/NDWY9017.sh: syntax error at line 101: 'process_year=$' unexpected
The code looks like:
if [ $# -eq 0 ]
then
process_year=`${ORACLE_HOME}/bin/sqlplus -s /nolog << !EOS 2>/dev/null
connect ${UID}
set heading off
set feedback off
set pagesize 0
select /*+ parallel (a) */ to_char(max(process_date), 'YYYY') process_date
from agency_commissions a
where commission_status = 'A';
!EOS
`
process_year=$( echo $process_year | cut -c12-15 );
distribution_list="agency_mail";
prod_line="All";
fi
Any ideas what needs to be different to run this under Maestro? Is there another group that I should be asking?
Your help is greatly appreciated.
Thanks,
gsdcrazy
I have the code below that reads a row from an Oracle database and then sets a variable with the results. It works great when I run it from the $ prompt, but, when we schedule it through the Maestro scheduler, I get the following errors:
/beta/nwdw/salesmi/bin/NDWY9017.sh: [[: not found
/beta/nwdw/salesmi/bin/NDWY9017.sh: syntax error at line 101: 'process_year=$' unexpected
The code looks like:
if [ $# -eq 0 ]
then
process_year=`${ORACLE_HOME}/bin/sqlplus -s /nolog << !EOS 2>/dev/null
connect ${UID}
set heading off
set feedback off
set pagesize 0
select /*+ parallel (a) */ to_char(max(process_date), 'YYYY') process_date
from agency_commissions a
where commission_status = 'A';
!EOS
`
process_year=$( echo $process_year | cut -c12-15 );
distribution_list="agency_mail";
prod_line="All";
fi
Any ideas what needs to be different to run this under Maestro? Is there another group that I should be asking?
Your help is greatly appreciated.
Thanks,
gsdcrazy