View previous topic :: View next topic
|
Author |
Message |
pullaiah.cts
New User
Joined: 02 Sep 2010 Posts: 50 Location: Pune
|
|
|
|
We have a job which executes whenever the file is available. The file is available once in a quarter, but the problem is if the file is available more than once within a same quarter then the job will get executed that many times. I want to circumvented this by introducing a condition like if the job has already ran for that particular quarter then it should not run in that particular quarter even the file is available multiple times.
Can anyone please let me know how can I acheive this? |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Job Scheduler is capable of doing this. Your scheduling people would be able to assist you with your job.
For CA7 & control-m there is a calendar feature which allows the job to be scheduled each month/quater/year.
Not sure about other schedulers. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
and how are You going to determine which one is the right one ?
no jcl trick will ever be able to do it,
onlyYour scheduler can/might be able to do it.
however the initial question should be asked and meditated upon |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi pullaiah.cts !
As Enrico mentioned:
And how are You going to determine which one is the right one ?
you could collect the incomming files by using GDG's. Create a new (+1) for the new available file.
Run a fix determined Job who handels all the created Gdg's and after that, delete them an define a new emty GDG for collecting the next incoming files. |
|
Back to top |
|
|
kratos86
Active User
Joined: 17 Mar 2008 Posts: 148 Location: Anna NGR
|
|
|
|
It's a weird requirement, but still do'able. You need to use a flag file in order to determine whether to process the file/not. Inside the job which is getting triggered after each arrival of the file, place a check at first step whether this is the first run. If first run continue processing and update the flag file for completion of first run.
When the flag file is updated, the second run check will fail and processing should be discontinued. Also using scheduler place another job to run at end of every quarter to clear the flag file. |
|
Back to top |
|
|
|