Macro Functions Syntax by Product

Base SAS

Name
Syntax and Description
%BQUOTE(character string | text expression) %NRBQUOTE(character string | text expression)
Mask special characters and mnemonic operators in a resolved value at macro execution.
Product: Base SAS
Document: SAS Macro Language: Reference
%EVAL(arithmetic or logical expression)
Evaluates arithmetic and logical expressions using integer arithmetic.
Product: Base SAS
Document: SAS Macro Language: Reference
%INDEX(source, string)
Returns the position of the first character of a string.
Product: Base SAS
Document: SAS Macro Language: Reference
%LENGTH(character string | text expression)
Returns the length of a string.
Product: Base SAS
Document: SAS Macro Language: Reference
%NRBQUOTE(character string | text expression)
Masks special characters, including & and %, and mnemonic operators in a resolved value at macro execution.
Product: Base SAS
Document: SAS Macro Language: Reference
%NRQUOTE(character string | text expression)
Masks special characters, including & and %, and mnemonic operators in a resolved value at macro execution.
Product: Base SAS
Document: SAS Macro Language: Reference
%NRSTR(character-string)
Masks special characters, including & and %, and mnemonic operators in constant text during macro compilation.
Product: Base SAS
Document: SAS Macro Language: Reference
%QSCAN(argument,n <,charlist<,modifiers> > )
Searches for a word and masks special characters and mnemonic operators.
Product: Base SAS
Document: SAS Macro Language: Reference
%QSUBSTR(argument, position <, length > )
Produces a substring and masks special characters and mnemonic operators.
Product: Base SAS
Document: SAS Macro Language: Reference
%QSYSFUNC(function(argument-1 <...argument-n>)<, format > )
Executes functions and masks special characters and mnemonic operators.
Product: Base SAS
Document: SAS Macro Language: Reference
%QUOTE(character string | text expression) %NRQUOTE(character string | text expression)
Mask special characters and mnemonic operators in a resolved value at macro execution.
Product: Base SAS
Document: SAS Macro Language: Reference
%QUPCASE(character string | text expression)
Converts a value to uppercase and returns a result that masks special characters and mnemonic operators.
Product: Base SAS
Document: SAS Macro Language: Reference
%SCAN(argument, n <,charlist <,modifiers > > ) %QSCAN(argument, n <,charlist <,modifiers > > )
Search for a word that is specified by its position in a string.
Product: Base SAS
Document: SAS Macro Language: Reference
%STR(character-string) %NRSTR(character-string)
Mask special characters and mnemonic operators in constant text at macro compilation.
Product: Base SAS
Document: SAS Macro Language: Reference
%SUBSTR(argument, position <, length > ) %QSUBSTR(argument, position <, length > )
Produce a substring of a character string.
Product: Base SAS
Document: SAS Macro Language: Reference
%SUPERQ(argument)
Masks all special characters and mnemonic operators at macro execution but prevents further resolution of the value.
Product: Base SAS
Document: SAS Macro Language: Reference
%SYMEXIST(macro-variable-name)
Returns an indication of the existence of a macro variable.
Product: Base SAS
Document: SAS Macro Language: Reference
%SYMGLOBL(macro-variable-name)
Returns an indication as to whether a macro variable is global in scope.
Product: Base SAS
Document: SAS Macro Language: Reference
%SYMLOCAL(macro-variable-name)
Returns an indication as to whether a macro variable is local in scope.
Product: Base SAS
Document: SAS Macro Language: Reference
%SYSEVALF(expression <, conversion-type > )
Evaluates arithmetic and logical expressions using floating-point arithmetic.
Product: Base SAS
Document: SAS Macro Language: Reference
%SYSFUNC(function(argument-1 <...argument-n>)<, format > ) %QSYSFUNC(function(argument-1 <...argument-n>)<, format > )
Execute SAS functions or user-written functions.
Product: Base SAS
Document: SAS Macro Language: Reference
%SYSGET(environment-variable)
Returns the value of the specified operating environment variable.
Product: Base SAS
Document: SAS Macro Language: Reference
%SYSPROD(product)
Reports whether a SAS software product is licensed at the site.
Product: Base SAS
Document: SAS Macro Language: Reference
%UNQUOTE(character string | text expression)
During macro execution, unmasks all special characters and mnemonic operators for a value.
Product: Base SAS
Document: SAS Macro Language: Reference
%UPCASE(character string | text expression) %QUPCASE(character string | text expression)
Convert values to uppercase.
Product: Base SAS
Document: SAS Macro Language: Reference