/******************* URBAN INSTITUTE MACRO LIBRARY *********************
: Warn_mput
Macro: Write a macro-generated warning message to the SAS LOG
Description
using %PUT.
: Open code
Use
: Peter Tatian
Author
***********************************************************************/
Warn_mput(
%macro Macro=, /* Macro name */
Msg= /* Message */
);
/*************************** USAGE NOTES *****************************
:
SAMPLE CALLWarn_mput( macro=MyMacro, Msg=Invalid parameter. )
%*********************************************************************/
/*************************** UPDATE NOTES ****************************
11/07/04 - If Macro= parameter blank, does not include [macroname] in
message. 09/06/05 - Reformatted so that message will be displayed in color
in SAS Enhanced Editor.
*********************************************************************/
***** ***** ***** MACRO SET UP ***** ***** *****;
%
%local SYL1 SYL2;
***** ***** ***** ERROR CHECKS ***** ***** *****;
%
***** ***** ***** MACRO BODY ***** ***** *****;
%
= WARN;
%let SYL1
%if %length( ¯o ) = 0 %then %do;
= ING:;
%let SYL2
%end;%else %do;
= ING: [&Macro];
%let SYL2
%end;
&SYL1&SYL2 &Msg;
%put
***** ***** ***** CLEAN UP ***** ***** *****;
%
%mend Warn_mput;
/************************ UNCOMMENT TO TEST ***************************
Warn_mput( macro=MyMacro, Msg=Test warning message. )
%/**********************************************************************/
Write a Warning Message
Purpose: Write a macro-generated warning message to the SAS LOG using %PUT.