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
 
Finding last day of the month from the Current date in EZT

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

New User


Joined: 09 Jan 2007
Posts: 26
Location: Chennai

PostPosted: Wed Jan 07, 2009 10:03 pm    Post subject: Finding last day of the month from the Current date in EZT
Reply with quote

Hi All,

I need to findout the Last month's last day (i.e. 31/12/2008) and current month's first day (i.e. 01/01/2009) using EZT. Can anybody help me to manipulate these dates?

Thanks in advance...
Back to top
View user's profile Send private message

hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Thu Jan 08, 2009 10:59 am    Post subject: Reply to: Finding last day of the month from the Current dat
Reply with quote

Hi,

You may try using SYSDATE-LONG (MM/DD/CCYY). This should give you current date. Once you have the current date. You will have to manipulate the day part of current date to '01' . You will get FIRST DAY of MONTH.

For LAST day of MONTH you need to use a more complex logic, may be few evaluate statements to identify the no. of day in that month.

OR

If you can use EZT along with DB2. Then its much easier using date functions of DB2. Ex : LAST_DAY(Current _date).

Thanks,
-Kapil.
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 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
No new posts Fetch Previous month & year in MM... girishb2 DFSORT/ICETOOL 3 Thu Sep 21, 2017 9:54 pm
No new posts LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm
No new posts Validate the Date girishb2 DFSORT/ICETOOL 9 Tue Sep 19, 2017 1:12 am

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