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