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 Finding IMS resource blocker after se... Hooman24 IMS DB/DC 1 Wed Aug 16, 2017 9:17 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 How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts finding delayed job/s in OPC jzhardy IBM Tools 0 Mon May 29, 2017 9:04 am
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm


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