Replace the default BY line with a new value in the BY line. The NOBYLINE option suppresses the default BY line variable. The #BYVAL parameter specification inserts the current value of the BY variable Year into the title.
options nobyline; title 'Leading Grain-Producing Countries'; title2 'for #byval(year)';