I have a query here.
I had a rqmt to write a pgm that takes system date and calcs prior months last date. So that I can give this value in the output file.
Like if its 15/01/06 then I shud calc and send 31/12/05 i.e Dec 12, 2005.
If its March,2006 then it shud check if this is a leap year. If yes then send 29/02/06 to the output file else 28/02/05.
In simple words calculating how many days the last month mite be having 28, 29, 30 or 31.
I just wanted to ask is. Can I do this in a jcl in a simpler way. If any.
Hi Mane Sagar,
I will also suggest you to go for REXX for ur requirement. For REXX, what OFFER71 has suggested you is quite fine. But if you have DB2 access then by querying to SYSIBM.SYSDUMMY you can easily get the date of ur previous month. If u want the query, pls let me know and I will send u the query.