When you invoke SAS, you can enter SYSPARM as an OPTION e.g. SYSPARM=’1995’. (The precise details how to do this will depend on your platform.) This is then available as a macro variable &SYSPARM.
In my own code, I have a macro to analyse SYSPARM because a complex program may have several parameters to check, e.g. SYSPARM=’YEAR=1995'. However, this involves functions like %INDEX and %SUBSTR, which would not be required for basic code.