If by "mainframe compiler" you are talking about a currently supported IBM compiler (or any other maintrame compiler that supports the '89 Standard Intrinsic Functions),
you can use the
INTEGER-of-DAY to get an integer from a YYYYDDD date
and use
DATE-of-INTEGER to get the date in YYYYMMDD format from that integer.
Depending on the version of COBOL you are using you can use the LE Callable Service routine "CEEDAYS", to convert the julian-date format to a lilian-date, followed by "CEEDATE", which will convert a lilian-date to a gregorian-date format (as well as many other formats).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.