The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Send one email with output result from 2 commands varu0612 Shell Programming and Scripting 4 01-16-2009 06:09 PM
Mac OS X 10.5: Can receive email, but not send email iBot OS X Support RSS 0 10-13-2008 10:20 PM
Mac OS X 10.5: Can receive email, but not send email iBot OS X Support RSS 0 09-27-2008 07:12 AM
Send email where # is in the email address - Using Unix jingi1234 UNIX for Dummies Questions & Answers 1 05-23-2005 11:23 AM
Unable to send eMail from a UNIX-Host ( using mailx ) to a Outlook-email-addres(Win) Vetrivela UNIX for Advanced & Expert Users 2 02-15-2005 10:43 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-25-2009
s1a2m3 s1a2m3 is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 11
Send email for each row in a result set

I have SQL giving me output of disabled ids in the system every day.
I can send on email for this disabled user list.
But I want to send one email for every disabled user or for every row.

thank you for your help.

Kyle
  #2 (permalink)  
Old 06-26-2009
aashok aashok is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 2
Smile

Are you using *LK* keyword in /etc/passwd file for marking locked user;
then I can play later;
  #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
Sponsored Links
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 07:59 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0