Suggestion in Autosys job


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Suggestion in Autosys job
# 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 07: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 or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Autosys job in UNIX

Hi all, I am new to Unix. I would like to create a Autosys job in Unix. Can you please suggest. below is the requirement. 1. Need t Send in email every 30 minutes from 11 am to 3:00 PM. E-mail should only be sent ONLY when below Query have data return. select * from emp where... (1 Reply)
Discussion started by: vasuvv
1 Replies

2. UNIX for Advanced & Expert Users

Autosys Job: Job did not start

I have submitted an autosys job and force start it. Autosys hit the job 4 times to restart but it did not start and finally I terminate the job. Any idea why the job did not start. Below is the code I executed. 1214 missun0ap /export/home/bzn97r/develop/dswi/jil$ sendevent -E FORCE_STARTJOB... (0 Replies)
Discussion started by: jnrohit2k
0 Replies

3. Shell Programming and Scripting

Autosys Job

I need to know the list of autosys job that run between given time. I have the following command. job_depends -t -J abc% -F "12/25/2010 03:00" -T "12/26/2010 05:00" Above command will give the list of job that run between time 3 AM and 5 AM. But the it gives me in random order how to... (1 Reply)
Discussion started by: diehard
1 Replies

4. UNIX for Dummies Questions & Answers

Autosys Job.

Hi Can any one tell me free online good book for autosys job. Also whats the basic difference between Autosys job and cron job. Thanks in advance. (2 Replies)
Discussion started by: diehard
2 Replies

5. Shell Programming and Scripting

autosys job configuration for job failure.

We need to configure autosys that when a job fails continously for 3 times, we need to call another job. Is this possible in Autosys, or can anyone advice on the alternative. (2 Replies)
Discussion started by: sangea
2 Replies

6. UNIX and Linux Applications

Job Scheduling (Autosys)

Hello! I will be working with Autosys and I am looking for individuals that have knowledge of this UNIX application. Thank-you! (3 Replies)
Discussion started by: preshe79
3 Replies

7. UNIX for Advanced & Expert Users

Autosys job scheduling

Hi, I want to schedule a job through Autosys (in Linux server) to run on 1st day of every 3rd month(gap of 90 days). Please someone help me to achive my above requirement Example: Run the sample.sh on 01-Jan-2009, 01-Apr-2009, 01-Jul-2009, 01-Oct-2009. Thanks in advance (4 Replies)
Discussion started by: apsprabhu
4 Replies

8. UNIX for Advanced & Expert Users

Documentation and books on Autosys Job Control Tool from Autosys

My project uses Autosys. I am new to this product and I don't know where to start from. Q1. Please provide me the link where I can get Autosys documentation Q2. Please refer a good book on Autosys. (Beginner/Intermediate Level) (0 Replies)
Discussion started by: gram77
0 Replies

9. UNIX for Dummies Questions & Answers

Kill a Job in Autosys

Hi, I have done kill-9 xxx for a job which is running in Autosys. But when i use autorep -j xxx it is showing the job is in run status. How to kill a job in Autosys which is in running status.. Thanks Arun (3 Replies)
Discussion started by: arunkumar_mca
3 Replies

10. Shell Programming and Scripting

Autosys job display

autorep -J dfile_252500_U_HSP_f2purge -w Job Name Last Start Last End ST Run Pri/Xit ________________________________________________________________ ____________________ ____________________ __ _______ ___ ... (1 Reply)
Discussion started by: arunkumar_mca
1 Replies
Login or Register to Ask a Question