Unix/Linux Go Back    


UNIX for Beginners Questions & Answers 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

UNIX for Beginners Questions & Answers


Tags
autosys

Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 10-10-2017   -   Original Discussion by vasuvv
vasuvv vasuvv is offline
Registered User
 
Join Date: Apr 2012
Last Activity: 13 November 2017, 7:03 AM EST
Posts: 24
Thanks: 7
Thanked 0 Times in 0 Posts
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 07:07 AM.. Reason: bakunin changed [/code] to [code]; rbatte1 formatted lists
Sponsored Links
    #2  
Old Unix and Linux 10-11-2017   -   Original Discussion by vasuvv
arunkumar_mca arunkumar_mca is offline
Registered User
 
Join Date: Oct 2004
Last Activity: 14 November 2017, 9:36 AM EST
Posts: 395
Thanks: 61
Thanked 2 Times in 2 Posts
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
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
OS suggestion daWonderer UNIX for Dummies Questions & Answers 2 03-23-2012 04:40 AM
Autosys: How to change a machine name in Autosys JIL. tp2115 UNIX for Dummies Questions & Answers 0 08-10-2011 12:02 PM
suggestion on awk Muthuraj K Shell Programming and Scripting 2 04-22-2010 07:29 AM
Documentation and books on Autosys Job Control Tool from Autosys gram77 UNIX for Advanced & Expert Users 0 11-10-2007 06:24 AM
Need your suggestion please.. unknown2205 Shell Programming and Scripting 1 11-21-2005 02:45 AM



All times are GMT -4. The time now is 05:19 AM.