One strongly suspects something in your data set named companys. Either their are missing values or the variable names are spelled differently than you used in the template.
I also would suggest running your Sgrender code without any macro variables.
dynamic year="&year;"; /* Pass the year to the template */
Do you need the semicolon in the quotes? I suspect that's an issue. You may not even need quotes if it's defined as numeric value. EDIT: You do need the quotes though.
dynamic year="&year";
One strongly suspects something in your data set named companys. Either their are missing values or the variable names are spelled differently than you used in the template.
I also would suggest running your Sgrender code without any macro variables.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.