Published on :
Utility AUCUNE

Example of using the %help macro

This code is also available in: Deutsch Español Français
The script invokes the %help macro without arguments to display general help. It then attempts to get help for a non-existent term ('xxx'), then for the %help macro itself and for 'set.vars', which could be a macro or an option. The commented lines at the beginning indicate possible integration with a SASUnit or similar testing framework, using assertions like %asserteq, %assertne, and %assertref. These commented lines are not executed.
Data Analysis

Type : AUCUNE


This script neither uses nor creates data. It only executes macro calls to retrieve help information from the SAS system.

1 Code Block
MACRO CALLS (commented)
Explanation :
This block contains commented assertion macro calls, presumably for unit tests (e.g., with SASUnit). The %asserteq, %assertne, and %assertref macros are used to check for equality, inequality, and reference existence, respectively. These lines are inactive and are not executed in the current script.
Copied!
1%*Please write test code here;;
2%*%asserteq( ,%help());
3%*%assertne( ,%help());
4%*%assertref( );
2 Code Block
MACRO CALLS
Explanation :
This block executes several calls to the standard %help macro. The first call without arguments displays general help for the SAS system. Subsequent calls search for help for the term 'xxx' (which is likely non-existent), for the %help macro itself, and for 'set.vars', which can be a user-defined macro or a reference to global SAS options/variables.
Copied!
1%help();
2%help(xxx);
3 
4%help(help);
5%help(SET.vars);
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.