needs minor revision (cannot apply the year format to the value returned by the year() function)[pre]YRF = PUT(DATEvariable,year2.);[/pre] But that dateVariable could be formatted in the put statement, since the string variable is not used elsewhere.
I would not use this routine with the date function, but that is just my personal preference. I don't often have to prepare programs to run where date() might return a different year from the year in constant &sysdate. (Does one of the BI servers create that situation?)
PeterC