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
 

 

CA7 set up to make sure job always runs before midnight

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
useit

Active User


Joined: 05 Oct 2006
Posts: 141

PostPosted: Mon May 28, 2012 3:21 pm    Post subject: CA7 set up to make sure job always runs before midnight
Reply with quote

hi,
i have a job which runs at around 8PM. problem here is there is a current date getting step. and based on current date am extracting some data.
so i should make sure your JOB always runs before midnight(because if it runs after midnit the date will change and it will extract next days data which is wrong).is there any way we can find out whether the job runs after or before midnit?

is there any CA7 SET UP? or any jcl step from which we can determine?

regds,
useit
Back to top
View user's profile Send private message

Smita.t2

New User


Joined: 17 Apr 2012
Posts: 22
Location: Bangalore

PostPosted: Mon May 28, 2012 4:55 pm    Post subject:
Reply with quote

How is current date fetched? Is your job running already in production?
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon May 28, 2012 4:57 pm    Post subject:
Reply with quote

I'm confused - what kind of solution are you looking for? Are you, by any chance, talking about Time Triggered Jobs in CA7?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Mon May 28, 2012 5:44 pm    Post subject: Reply to: CA7 set up to make sure job always runs before mid
Reply with quote

Why don't you use a Business Date/Data Date, instead of current date, then you don't have to worry about Midnight, or re-runs.
Back to top
View user's profile Send private message
useit

Active User


Joined: 05 Oct 2006
Posts: 141

PostPosted: Mon May 28, 2012 5:45 pm    Post subject:
Reply with quote

hi,
its an existing job .inside there is a step to extract all the current days data . (current date is fetched using (DATE1).it usuall runs between 8-8.30 .

say if todays job got abended for some reason and we restarted it after 12.
the date1 wil be tomorrows date whic is actually incorrect. i want to empty out the extracted file in case if todays job runs after 12.

is there any way which we can find out and empty out the file in case if job runs after 12?? either through jcl step or ca7 set up?

regds,
useit
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1714
Location: UK

PostPosted: Mon May 28, 2012 5:53 pm    Post subject:
Reply with quote

Have a job - possibl;y your job - have a step that gets the date and stores it. The step that needs it can then read it either right there and then or after a restart. This assumes that you have restart control. If not, then make the date-getting step a prior job.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon May 28, 2012 6:06 pm    Post subject:
Reply with quote

Quote:
say if todays job got abended for some reason and we restarted it after 12.
the date1 wil be tomorrows date whic is actually incorrect. i want to empty out the extracted file in case if todays job runs after 12.
One possible solution is that, which probaly must be in use already, in RESTART instruction you mention about the specific use of date.

2nd, possibly, you can make use of EZACFSM1 and use the information from it in your favor:
Code:
//SYMBOLS EXEC PGM=EZACFSM1   
//SYSOUT    DD  SYSOUT=*       
//SYSIN     DD  *             
CCYY/MM/DD '&YR4./&LMON./&LDAY'
HH:MM:SS   '&HR.:&MIN.:&SEC'   
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue May 29, 2012 12:20 am    Post subject:
Reply with quote

Hello,

Another possibility is to have the code check the time and if the time is between midnight and some time (i.e. 9am) calculate the data as yesterday, not today. . .

This would only work as long as the job is always run in the evening.

My preference would be to put the data in a file and use this to control the run.
Back to top
View user's profile Send private message
useit

Active User


Joined: 05 Oct 2006
Posts: 141

PostPosted: Tue May 29, 2012 11:43 am    Post subject:
Reply with quote

anju,

tested the jcl it ran fine. but am getting one hour difference in the time. what is the reason for this?

in JES2 JOB LOG -THE JOB START TIME AND END TIME IS "06.59.58"

BUT MY OUTPUT IS AS BELOW

Code:
********************************* TOP OF DATA **********************************
CCYY/MM/DD '2012/05/29' HH:MM:SS   '05:59:58'                                   
******************************** BOTTOM OF DATA ********************************


Is there any specific reason for this?

Regds,
useit
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Tue May 29, 2012 11:50 am    Post subject:
Reply with quote

(Guess)
Maybe related to Daylight savings thing?
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Tue May 29, 2012 12:12 pm    Post subject:
Reply with quote

I think the job produces UTC time and your system time is UK time.
UK time is 1 hour ahead of UTC time, So this maybe the difference?

Difference between GMT and BST.
http://publib.boulder.ibm.com/infocenter/zos/v1r12/index.jsp?topic=%2Fcom.ibm.zos.r12.halz002%2Fhead6.htm
this link says that the job produces UTC times
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue May 29, 2012 12:18 pm    Post subject:
Reply with quote

No that's not related to Day-Light savings.

When "&HR" is used with EZACFSM1, symbol translator utility, hour of the day is calculated based on UTC. And it'll be shown in two decimal digits, 00-23. Same is applicable to minutes and seconds part of the time.

Use the below symbols for the local time:
Code:
//SYMBOLS EXEC PGM=EZACFSM1   
//SYSOUT    DD  SYSOUT=*       
//SYSIN     DD  *             
CCYY/MM/DD '&YR4./&LMON./&LDAY'
HH:MM:SS   '&LHR.:&LMIN.:&LSEC'
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 -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
No new posts DFSORT VB File make 2 lines from 1 BridgetBrackenbury DFSORT/ICETOOL 2 Fri Feb 12, 2016 3:48 am
No new posts How to make REXX process different GDGs? venksiv CLIST & REXX 15 Thu Sep 24, 2015 5:35 pm
No new posts Natural online, make a password invis... nitj Java & MQSeries 1 Tue Dec 09, 2014 4:54 pm
No new posts log file runs out of space, an error ... sravindra_s JCL & VSAM 4 Thu Jul 17, 2014 1:09 pm


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