IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Comparing the date of execution of a job


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pullaiah.cts

New User


Joined: 02 Sep 2010
Posts: 50
Location: Pune

PostPosted: Tue Oct 04, 2011 2:32 pm
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Tue Oct 04, 2011 2:56 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Oct 04, 2011 3:01 pm
Reply with quote

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
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Tue Oct 04, 2011 5:29 pm
Reply with quote

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
View user's profile Send private message
kratos86

Active User


Joined: 17 Mar 2008
Posts: 148
Location: Anna NGR

PostPosted: Fri Oct 07, 2011 2:40 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Capturing Job Execution Information All Other Mainframe Topics 3
No new posts Need help to append a date&tsp at... DFSORT/ICETOOL 9
Search our Forums:

Back to Top