Published on :
Macro INTERNAL_CREATION

AHGsome Utility Macro

This code is also available in: Deutsch Español Français
This macro, '%AHGsome', accepts a single parameter, 'str', which is intended to be a character string. Its purpose is to return a logical expression that evaluates to true if 'str' contains text (is not blank/empty) and false otherwise. To do this, it delegates the check for string emptiness to another macro, '%AHGblank', and then inverts the result of this check (not %AHGblank(&str)). This approach is typical for utility macros designed to simplify logical conditions in other SAS© programs.
Data Analysis

Type : INTERNAL_CREATION


The '%AHGsome' macro does not process external or internal SAS datasets. It operates solely on a character string provided as a parameter during its call, performing a check for its non-emptiness. The 'data' are therefore character string inputs passed directly to the macro.

1 Code Block
MACRO
Explanation :
This block defines the '%AHGsome' macro. It takes an argument named 'str'. The instruction 'not %AHGblank(&str)' indicates that the macro returns the negation of the result of '%AHGblank(&str)'. If '%AHGblank' evaluates to true for an empty string, then '%AHGsome' evaluates to true for a non-empty string.
Copied!
1%macro AHGsome(str);
2not %AHGblank(&str)
3%mend;
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.