The DATE attribute can also cause implicit conversions to occur in assignments of two variables declared with date patterns.
dcl start_date char(6) date; start_date = ''; ...
dcl x char(6) date;
dcl y char(8) date('YYYYMMDD');
y = '20600101';
x = y; /* raises error if window is <= 1960 */Even if you do not choose a windowing solution, you might have some code that needs to manipulate both two- and four-digit years. You can use multiple date patterns to help you in these situations:
dcl old_date char(6) date('YYMMDD');
dcl new_date char(8) date('YYYYMMDD');
new_date = old_date;