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

is this possible to run a job at last day of month


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jai_jain
Warnings : 2

New User


Joined: 17 Apr 2007
Posts: 7
Location: new delhi

PostPosted: Fri Jul 13, 2007 11:04 pm
Reply with quote

how its possible o run a job at last day of month??? icon_sad.gif
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Fri Jul 13, 2007 11:34 pm
Reply with quote

Automatically? Use your scheduler......
Manually? Use your calendar.......
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sat Jul 14, 2007 3:54 am
Reply with quote

Aaaaaaaaaaah, but the OP hasn't differentiated between a calendar day or a working day ....
Back to top
View user's profile Send private message
skkp2006

New User


Joined: 14 Jul 2006
Posts: 93
Location: Chennai,India

PostPosted: Mon Jul 16, 2007 11:23 am
Reply with quote

All i can think is like pass the current date from the JCL to the program and check the date with the following SQL.... if the dates match run the program

Code:
SELECT LAST_DAY(CURRENT DATE) FROM SYSIBM.SYSDUMMY1;


Regards,
Syam
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Mon Jul 16, 2007 8:44 pm
Reply with quote

Hello,

Before there can be an implementation, the observation from Expat must be considered.

The definition of "last day" changes from organization to organization and sometimes from application to application within an organization.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Mon Jul 16, 2007 8:53 pm
Reply with quote

skkp2006 wrote:
All i can think is like pass the current date from the JCL to the program and check the date with the following SQL.... if the dates match run the program

Code:
SELECT LAST_DAY(CURRENT DATE) FROM SYSIBM.SYSDUMMY1;


Regards,
Syam

Why not just use this then you don't have to pass any date in the jcl.
Code:
exec sql set :ws-current-date = current date end-exec.
exec sql set :ws-last-day = last_day(current date) end-exec.
Then compare the two dates but rememeber the warnings above about the last day of the month and the last work (or bussiness) day of the month.
Back to top
View user's profile Send private message
skkp2006

New User


Joined: 14 Jul 2006
Posts: 93
Location: Chennai,India

PostPosted: Tue Jul 17, 2007 9:49 am
Reply with quote

Craq,

The reason to pass date through JCL is for testing purposes. Otherwise we will need to wait till the last day of the month to see the program working.
What i have seen in most of the programs is like if date passed through JCL is spaces the pgm will pick up the current date....

Why not eliminate the first SQL and use the cobol statement below......
Code:
ACCEPT  MyDate FROM DATE YYYYMMDD


Regards,
Syam
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 Populate last day of the Month in MMD... SYNCSORT 2
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts replace word 'MONTH' with current mon... SYNCSORT 11
No new posts Help, trying to use OVERLAY to get a ... DFSORT/ICETOOL 3
No new posts To get previous month from current ti... SYNCSORT 7
Search our Forums:

Back to Top