Home Man
Search
Today's Posts
Register

If you're not sure where to post a Unix or Linux question, post it here. All unix and Linux beginners welcome in this forum!

Suggestion in Autosys job

Tags
autosys

Login to Reply

 
Thread Tools Search this Thread
# 1  
Old 10-10-2017
Suggestion in Autosys job

Hi,

I am new to Unix and Autosys. I have written Oracle query. Now I would like to create Autosys job. below is the requirement.
  1. Send in email every 30 minutes from 11 to 4:00 PM. E-mail should only be sent ONLY when below Query have data return.
  2. Email format:
    • To: ,
    • From: ,
    • Email Subject: Data List
    • Email content:

Code:
select ts.sup_num, ts.s_add_num, 

ts.ind_qty, ts.total_qty, tb.b_qty, tt.tri_qty ,
case when ts.total_qty-tb.b_qty > tt.tri_qty then tt.tri_qty
else ts.total_qty-tb.b_qty end as rls_qty
from
(
select sup_num, s_add_num, count(*) , abs(sum(sh_qty)) as total_qty , LISTAGG(sh_qty, ',') WITHIN GROUP (ORDER BY updt_last_tmstp ) as ind_qty
from p_sls_trn where trunc(trans_dt) = '16-aug-2017' and dc_cd='C' and brc_cd='002'
group by s_add_num ,sup_num
) pts,
( select s_add_num, abs(settlement_dt_qty) as b_qty from tash where brc_cd||act_cd||TYPE_act_cd||act_nbr = '120000000987'
) tsh_box,
( select s_add_num, abs(settlement_dt_qty) as tri_qty from tash where brc_cd||act_cd||TYPE_act_cd||act_nbr in ('120000000087','120000009874')
)tsh_tri
where ts.s_add_num = tb.s_add_num and ts.s_add_num = tt.s_add_num
and ts.total_qty > tb.b_qty and tt.tri_qty > 0 ;

Can you please advise to create a job.

Thanks,
Vasu

Last edited by vasuvv; 10-10-2017 at 06:07 AM.. Reason: bakunin changed [/code] to [code]; rbatte1 formatted lists
# 2  
Old 10-11-2017
Assuming you know how to create job in autosys.

Step1 : Create a script which will execute the query and populate it to a file. If the file is having more that one record you can execute a mailx to send the email

Step2: Create a job and make that to run every 30 min using the autosys start_time parameter


Let me know if you need more details
Login to Reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Regarding suggestion RavinderSingh13 Post Here to Contact Site Administrators and Moderators 2 09-24-2014 01:27 PM
Need Suggestion bhupinder08 Shell Programming and Scripting 0 08-31-2012 02:59 AM
OS suggestion daWonderer UNIX for Dummies Questions & Answers 2 03-23-2012 03:40 AM
Autosys: How to change a machine name in Autosys JIL. tp2115 UNIX for Dummies Questions & Answers 0 08-10-2011 11:02 AM
suggestion on awk Muthuraj K Shell Programming and Scripting 2 04-22-2010 06:29 AM
Suggestion vishwamitra Post Here to Contact Site Administrators and Moderators 7 11-18-2009 01:07 PM
need your suggestion dellsh Shell Programming and Scripting 0 04-02-2009 06:51 AM
Documentation and books on Autosys Job Control Tool from Autosys gram77 UNIX for Advanced & Expert Users 0 11-10-2007 05:24 AM
Need your suggestion please.. unknown2205 Shell Programming and Scripting 1 11-21-2005 01:45 AM
I want a suggestion camel Programming 6 06-13-2003 06:59 PM


All times are GMT -4. The time now is 06:27 PM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password