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
 

 

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 TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
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
This topic is locked: you cannot edit posts or make replies. Get correct date and time when curren... balaji81_k DB2 24 Fri Oct 14, 2016 10:40 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm


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