Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 6966
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: 6966
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
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
No new posts CICS transaction slow response time vasanthz All Other Mainframe Topics 2 Thu Jan 19, 2017 1:31 am
No new posts DD DUMMY & CPU TIME Nileshkul Testing & Performance analysis 16 Mon Dec 19, 2016 11:35 pm
This topic is locked: you cannot edit posts or make replies. Get a job submitted itself every time... arunsoods JCL & VSAM 3 Tue Nov 22, 2016 4:05 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us