Thank you so much Nicolas!
This job runs on Unix Solaris with an Oracle db. My new system is Windows with SQLserver 2005 db. I can't read the script very well myself. I just know what the out put is
What do you mean "who hides behind the SQL command"? I will work on it and if it is alright I will send it to you once I finished. Ok? Here is the other script I need to convert..please take a look.
They are similar.
echo "STEPS & POSTPROC REPORT - CONTROL-M/Server $Host ON: $Date">$report
sqlplus -S dbo/dbopswd@EM613 <<EOF>> $report
set head off
select a.SCHEDTAB, a.JOBNAME, b.LOGIC_DEST StepsDoMail, c.MESSAGE PostProcMsg
from CMS_JOBDEF a, CMS_MAIL b, CMS_SHOUT c
where a.JOBNO=b.JOBNO and b.JOBNO=c.JOBNO and c.JOBNO=a.JOBNO
order by a.SCHEDTAB, a.JOBNAME;
mailx -s "STEPS & POSTPROC REPORT - CTM/Server sched1" $2 < $1
(the EM613 is the Oracle SID)