Hi Chris -

>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.

The easiest way would be in RPG IV, which can handle this kind of thing easily.

However if you must do it in CL, use the CVTDAT command.  Try it with the
month and year and day 31.  Monitor for message CPF0555.  If you receive
that message, try it again with day 30, then 29, then 28.  When you don't
get message CPF0555, then the date conversion was successful and so the
date was valid.

Ken
http://www.ke9nr.org/
Opinions expressed are my own and do not necessarily represent the views of
my employer or anyone in their right mind.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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

This mailing list archive is Copyright 1997-2024 by midrange.com 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.