I'm not sure what your CL objectives are from this post. There are certain commands that will permit date data type differences. OPNQRYF is one of them - see example. Dave Code
Thanks for your answer, Dave. My CL-pgm looks like the code below. The problem is that the instruction %duration(&date2 - &date1) does not exist in CLP and i don't know how i can resolve this. Code
You could use the CVTDATE to convert your two input dates to julian dates and determine the "duration". But you have to be careful and provide for dates that fall within different years. However using the TOFMT(*LONGJUL) may help.
You can call the CEEDAYS API. The CEEDAYS will convert a date to a lillian date, then you can add or subtract the two converted dates to get the duration.
Hi, I have a CLP that receives 2 dates as parameters and it should return a text-string under the following conditions. The dates are in yyyymmdd format. If duration between the 2 dates > 367 then text = "Report yyyymmdd1-yyyymmdd2. if duration < 10 then text = "weekly report". If duration < 32 then text = "monthly report". if duration < 93 then text = "trimestrial report". if duration < 186 then text = "Semestrial report". if duration < 367 then text = "Yearly report". Is this possible in CL or should i replace the program by an HLL-Pgm ? As i still use OPM-Cobol and not know RPGILE, i should appreciate it to receive the coding to achieve this. Thanks for any reply
Comment