The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 06-30-2009
s1a2m3 s1a2m3 is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 11
No. I am pulling data from table directly. I want to send seprate email for every locked id to help desk for word order creation.
SQL below.

@@\.login_JDEDB.sql
set echo off
set verify off
set feed off term off
prompt ********************************************************
prompt Todays Date
prompt ********************************************************
prompt This SQL runs Daily to Display JDE Locked Out ID
prompt ********************************************************
set feedback on
set echo off head off feed off veri off trimspool on
spool /home/oracle/log/Daily_lockedout.log
set heading on;
set linesize 200;
Select sysdate From dual;
prompt "Following JDE System User Ids Locked Out"
Select SCUSER AS "User Id" FROM SYS7333.F98OWSEC
WHERE SCEUSER =02;
spool off
exit
********************
Than follow script sends email for all user ids locked out. But I want one email per user.

#!/bin/sh
. /home/oracle/.cron_profile
#
export LOGDIR=/home/oracle/log
cd /home/oracle
#
sqlplus /nolog @/home/oracle/Daily_lockedout.sql
#
cat $LOGDIR/Daily_lockedout.log >>$LOGDIR/Daily_lockedout.all.log

mail -s "JDE User IDs Lockedout" help@abc.com < $LOGDIR/Daily_lockedout.log
mail -s "JDE User IDs Lockedout" support@abc.com < $LOGDIR/Daily_lockedout.log


Thanks for your help.

Akbar