Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
To get last and present jcl run date and time

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
madhushreehp

New User


Joined: 19 Jun 2009
Posts: 4
Location: Bangalore

PostPosted: Fri Jun 19, 2009 3:15 pm    Post subject: To get last and present jcl run date and time
Reply with quote

Hi,
Currently, I have a requirement where in I need to capture the current date and time of the job run and last job run date and time and compute the difference in between the two runs to compare it with a field value.

Is there a way of capturing last job run date and time as well as present job run date and time??

Kindly let me know.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Jun 19, 2009 3:22 pm    Post subject:
Reply with quote

Unfortunately your requirement is not quite clear.

Please elaborate on the requirement, and also some insight into the need for this may help us offer a solution.
Back to top
View user's profile Send private message
madhushreehp

New User


Joined: 19 Jun 2009
Posts: 4
Location: Bangalore

PostPosted: Fri Jun 19, 2009 3:32 pm    Post subject: Reply to: [b]To get last and present jcl run date and time[/
Reply with quote

I can better explain you with an example.
Say for example I have a job JCL1 that runs many times a day. Suppose JCL1 runs 2 times today.i.e; 19/06/2009 on 8 AM in the morning and
it is running now.
Then, I need to get the current date and time of run..say 19/06/2009 and 3:40 PM.
And, also the last job run date and time..that is 19/06/2009 and 8.00 AM.

Is there a way of getting these details thru jcl?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Fri Jun 19, 2009 3:35 pm    Post subject:
Reply with quote

I would suggest establishing some kind of central control file;
would contain a minimum of two fields (vsam)/ columns (db2).

each time the job is run
  1. 'move current-run-date field/column to last-run-date field/column
  2. populate the current-run-date field/column
  3. compare
.

if you are expecting to scroll thru SMF data or something to determine the last run date---you are being unrealistic.

a scheduler may be able to provide a last run date for a job.

and a last question---why do you have to do this?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Jun 19, 2009 3:36 pm    Post subject:
Reply with quote

What I was really after was the need to know when the last execution was.
Back to top
View user's profile Send private message
madhushreehp

New User


Joined: 19 Jun 2009
Posts: 4
Location: Bangalore

PostPosted: Fri Jun 19, 2009 3:46 pm    Post subject: Reply to: [b]To get last and present jcl run date and time[/
Reply with quote

Actually, there is a front-end java application for which I am doing the batch processing.
There are different screen which has diff fields. when the user enters value on the screen, they will be stored in the DB2 tables.In one such screen, there is a field value min duration between the 2 runs ( the value of which will be entered by the user and it is stored in the DB2 table).
To validate this field, i need to get the jcl last run date and time and the jcl current run date and time.Compare those two and if this is less than the value present in the table for this field min duration between the 2 runs, I have to cancel the present run..else continue with the process.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Fri Jun 19, 2009 4:23 pm    Post subject:
Reply with quote

sounds as if that db2 table which contains "min duration between the 2 runs"
should also contain "last-run-date-time", which would be populated by the batch job.
Back to top
View user's profile Send private message
madhushreehp

New User


Joined: 19 Jun 2009
Posts: 4
Location: Bangalore

PostPosted: Fri Jun 19, 2009 4:40 pm    Post subject:
Reply with quote

Okay...Thanks!! This solves my problem:)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts sending email from jcl using the mail... niloyarp JCL & VSAM 5 Tue Oct 10, 2017 12:32 pm
This topic is locked: you cannot edit posts or make replies. 00D3003B - time outs in DB2 when invo... chavinash2004 DB2 2 Mon Oct 09, 2017 4:39 pm
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us