SYSPARM is an automatic variable in SAS which allows information to be passed from the operating environment to SAS program steps and it provide means of accessing or using the string while a program is executing. SYSPARM should be used when there is a need to control conditional processing within a SAS program. SYSSPARM can be used anywhere in a SAS program.
To assign value to SYSPARM we use SYSPARM= option.
To retrieve the value, we use the option SYSPARM() system option.
In the below example, we will see how to use the SCAN function to retrieve the values of the parm(delimited) into corresponding variables.

The output looks like:

There are several system defined variables which stores relevant information about system date, time, job name, user ID, Operating system etc. Tried to put a bunch into a SAS program and print the output.

The Output in syslog will display as

There are more system level parameters which can be used in programing. This is just to demonstrate how we can use SYSPARMS in SAS.

Leave a comment

Discover more from DBzTech-Technology Dossier

Subscribe now to keep reading and get access to the full archive.

Continue reading