As far as constructing a utility program, I have a few ideas. The parameter of MONTHS could be specified as a SPECIAL-NAMES set of data, then code in the 12 months in whatever format you are using. Later on, the programmer can test the month against this constructed data-type i.e.
Second, there is no COBOL function that i know of that validates a date, other then maybe those added to the standard by a specific compiler manufacturer.
There may be some compilers that have added functionality that can do that.
If you really look at it, you must admit that it can be a hell of a task for someone new to cobol. Doesn't the input have any structure you could benefit from?
:-))) This is probably not the case, but what I am trying to tell you is: "Study the input before creating the program logic".
I need a date validate dd/mm/yyyy, exist simple someway to validate, like numerics variables, that it is validated with IS NUMERIC?
Or have I that the day verify if value is 1 to 30 or 1 to 31 or 1 to 28 or 1 to 29, according with month and year? Hello, Most organizations have a callable date validation routine - so that everyone is using the same "rules".Hope this helps, Nina Too We made a program in JAVA in which we had to make our own date object from scratch and validate it. We used rule-based design techniques, to cover every possible combination. I'M CURRENTLY WORKING ON AN INTERACTIVE PROGRAM PROJECT AND I WAS WANTING TO USE A COBOL FUNCTION TO TEST IF A DATE WAS A VALID DATE. If nothing like this is available already it will have to be constructed. The COBOL standard doesnt really have an intrinsic function that specifically tests the validity of a date. In my case, a separate utiliy program is used to perform date functions, which can be called from any COBOL program. It wasnt too hard, but takes careful thought and a logical approach.