SYSPARM Function

Returns the system parameter string.

Category:Special

Table of Contents

Syntax

SYSPARM()

Details

If the SYSPARM function returns a value to a variable that has not yet been assigned a length, by default the variable is assigned a length of 200.

SYSPARM enables you to access a character string specified with the SYSPARM= system option at SAS invocation or in an OPTIONS statement.

Note: If the SYSPARM= system option is not specified, the SYSPARM function returns a string with a length of zero.

Example

options sysparm='yes';                                                                                                                  
data one;                                                                                                                               
   if sysparm()='yes' then do;                                                                                                            
   put 'This worked';                                                                                                                    
   end;                                                                                                                                   
run;

These statements produce this result:

This worked

See Also

Last updated: April 14, 2026