I need to work with records (read from a work file), whose values for the YEARS field (it is a numeric field in position 1, with length 4) need to be in a range: INITIAL YEAR (CURRENT YEAR - 4) and FINAL YEAR (CURRENT YEAR - 1).
My issue is about how to obtain the current year, in a simple way for this case, and use it subtracting values... here is a sample code of what I would like to work with INITIAL-YEAR and FINAL-YEAR:
SORT FIELDS=COPY
OMIT COND=(1,4,ZD,LT,INITIAL-YEAR,AND,
1,4,ZD,GT,FINAL-YEAR)
OMIT COND=(1,4,ZD,LT,INITIAL-YEAR,AND,
1,4,ZD,GT,FINAL-YEAR)
If anyone could help me, I'd appretiate it.
Thanks in advance.