johnpayback
IS-IT--Management
I have the script below which works via command line. When ran using Autosys it fails with the Autosys log saying "cannot open dialer_extract.sql". All files are in the same directory unless otherwise noted in the script.
What am I doing wrong and how do I fix it?
NOTE: I also tried adding the environment variables rather than executing the .profile. No luck.
"dialer_extract.sql" permissions set to 755
"dialer_extract.sql" SPOOL's to purge.txt
JP
BS/Computer Science
What am I doing wrong and how do I fix it?
NOTE: I also tried adding the environment variables rather than executing the .profile. No luck.
"dialer_extract.sql" permissions set to 755
"dialer_extract.sql" SPOOL's to purge.txt
Code:
#!/bin/ksh
. /users/apps/jp/.profile
pathlog=/users/apps/jp/bin/ksh
filelog=purge.txt
email='jp@somewhere.com'
read upass < /users/apps/jp/bin/ksh/pw
sqlplus -s /nolog <<EOSQL
connect ${upass}
@dialer_extract.sql
exit
EOSQL
( cat <<-MSG
Hello,
Please see the attached dialer extract file.
Thank you,
JP
MSG
uuencode ${pathlog}/${filelog} ${filelog}
) | mailx -s "Dev - Dialer Extract" ${eMail}
JP
BS/Computer Science