There is a dropdown list, populated form a table. The current year and 5 years before the current year is displayed. To do this, there are some trasformations made. The code has been attached below. BUt i need to display the year before the current year as the default value.
Please help me out in implementing this.
-DEFAULTS &YR=' ';
TABLE FILE EMP_TAB PRINT DST.AC_YR BY HIGHEST AC_YR ON TABLE HOLD AS DISTYEAR FORMAT ALPHA END
FILEDEF yearlst DISK yrlst.txt -RUN
DEFINE FILE DISTYEAR TODAYDATE/YYMD=&YYMD; TODAYYEAR/YY=TODAYDATE; STRYEAR/A5=EDIT(AC_YR,'$99999$$$$$$$'); STRSEL/A9 = IF '&YR' EQ STRYEAR THEN ' SELECTED' ELSE ' '; STROPTION/A120=''; END
TABLE FILE DISTYEAR SUM STROPTION BY HIGHEST AC_YR WHERE AC_YR LE TODAYYEAR WHERE RECORDLIMIT EQ 6 ON TABLE HOLD AS yrlst FORMAT ALPHA END
April 18, 2007, 03:24 AM
Alan B
In the DEFINE I normally create the whole option tag.