Are you willing to call an RPG program?  Because in RPG ILE, it should be
pretty easy to do.  Assuming you're passing in a YYMMDD date, you should be
able to set the day to 01, then add one month, then subtract one day.

DDate             S               D   DATFMT(*ISO)
C     *entry        plist
C                   parm                    yymmdd            6 0
C                   move      '01'          yymmdd
C     *ymd          move      yymmdd        Date
C                   adddur    1:*m          Date
C                   subdur    1:*d          Date
C     *ymd          move      Date          yymmdd
C                   move      *on           *inlr

This ought to work.


> -----Original Message-----
> From:
> []On Behalf Of
> Sent: Thursday, December 06, 2001 2:57 PM
> To:
> Subject: Month End CL
> I am working on a small CL program and I am wondering what the best way to
> determine the last day of the month is. I'm not a programmer, but this is
> just a small project I'm working on.
> Thanks for any help,
> Chris Whisonant
> Senior Mid-Range Systems Administrator
> Comporium Group
> (803)-326-7270
> _______________________________________________
> This is the Midrange Systems Technical Discussion (MIDRANGE-L)
> mailing list
> To post a message email:
> To subscribe, unsubscribe, or change list options,
> visit:
> or email:
> Before posting, please take a moment to review the archives
> at

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.