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
 
is this possible to run a job at last day of month

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: is this possible to run a job at last day of month
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: 3158
Location: Tucson AZ

PostPosted: Fri Jul 13, 2007 11:34 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Sat Jul 14, 2007 3:54 am    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Mon Jul 16, 2007 8:44 pm    Post subject:
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    Post subject:
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    Post subject: Re: is this possible to run a job at last day of month
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    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 Fetch Previous month & year in MM... girishb2 DFSORT/ICETOOL 3 Thu Sep 21, 2017 9:54 pm
No new posts Reg:Displaying the particular month o... bhavana yalavarthi All Other Mainframe Topics 4 Sat Jul 08, 2017 8:13 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts How to get previous month in SYMNAMES Suganya87 SYNCSORT 9 Fri Oct 28, 2016 1:37 pm

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