1 The SAS System 06:17 Monday, May 21, 2007 NOTE: Copyright (c) 1999-2001 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software Release 8.2 (TS2M0) Licensed to XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. NOTE: This session is executing on the XXXXX XXX platform. This message is contained in the SAS news file, and is presented upon initialization. Edit the files "news" in the "misc/base" directory to display site-specific news and information in the program log. The command line option "-nonews" will prevent this display. NOTE: SAS initialization used: real time 0.13 seconds cpu time 0.09 seconds 1 options mprint mtrace mlogic symbolgen; 2 3 %macro test_no_quotes(title); 4 %if &title = %then %let title = Default title; 5 %put SPECIAL: TITLE is "&title"; 6 %mend; 7 8 %test_no_quotes(Shoe Sales by Quarter); MLOGIC(TEST_NO_QUOTES): Beginning execution. MLOGIC(TEST_NO_QUOTES): Parameter TITLE has value Shoe Sales by Quarter SYMBOLGEN: Macro variable TITLE resolves to Shoe Sales by Quarter MLOGIC(TEST_NO_QUOTES): %IF condition &title = is FALSE MLOGIC(TEST_NO_QUOTES): %PUT SPECIAL: TITLE is "&title" SYMBOLGEN: Macro variable TITLE resolves to Shoe Sales by Quarter SPECIAL: TITLE is "Shoe Sales by Quarter" MLOGIC(TEST_NO_QUOTES): Ending execution. 9 %test_no_quotes(Stocks and Shares Earnings); MLOGIC(TEST_NO_QUOTES): Beginning execution. MLOGIC(TEST_NO_QUOTES): Parameter TITLE has value Stocks and Shares Earnings SYMBOLGEN: Macro variable TITLE resolves to Stocks and Shares Earnings ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was: ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was: ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was: &title = &title = &title = ERROR: The macro TEST_NO_QUOTES will stop executing. ERROR: The macro TEST_NO_QUOTES will stop executing. ERROR: The macro TEST_NO_QUOTES will stop executing. MLOGIC(TEST_NO_QUOTES): Ending execution. 10 %test_no_quotes(); MLOGIC(TEST_NO_QUOTES): Beginning execution. MLOGIC(TEST_NO_QUOTES): Parameter TITLE has value SYMBOLGEN: Macro variable TITLE resolves to MLOGIC(TEST_NO_QUOTES): %IF condition &title = is TRUE MLOGIC(TEST_NO_QUOTES): %LET (variable name is TITLE) MLOGIC(TEST_NO_QUOTES): %PUT SPECIAL: TITLE is "&title" SYMBOLGEN: Macro variable TITLE resolves to Default title SPECIAL: TITLE is "Default title" MLOGIC(TEST_NO_QUOTES): Ending execution. 11 12 %macro test_quotes(title); 13 %if "&title" = "" %then %let title = Default title; 2 The SAS System 06:17 Monday, May 21, 2007 14 %put SPECIAL: TITLE is "&title"; 15 %mend; 16 17 %test_quotes(Shoe Sales by Quarter); MLOGIC(TEST_QUOTES): Beginning execution. MLOGIC(TEST_QUOTES): Parameter TITLE has value Shoe Sales by Quarter SYMBOLGEN: Macro variable TITLE resolves to Shoe Sales by Quarter MLOGIC(TEST_QUOTES): %IF condition "&title" = "" is FALSE MLOGIC(TEST_QUOTES): %PUT SPECIAL: TITLE is "&title" SYMBOLGEN: Macro variable TITLE resolves to Shoe Sales by Quarter SPECIAL: TITLE is "Shoe Sales by Quarter" MLOGIC(TEST_QUOTES): Ending execution. 18 %test_quotes(Stocks and Shares Earnings); MLOGIC(TEST_QUOTES): Beginning execution. MLOGIC(TEST_QUOTES): Parameter TITLE has value Stocks and Shares Earnings SYMBOLGEN: Macro variable TITLE resolves to Stocks and Shares Earnings MLOGIC(TEST_QUOTES): %IF condition "&title" = "" is FALSE MLOGIC(TEST_QUOTES): %PUT SPECIAL: TITLE is "&title" SYMBOLGEN: Macro variable TITLE resolves to Stocks and Shares Earnings SPECIAL: TITLE is "Stocks and Shares Earnings" MLOGIC(TEST_QUOTES): Ending execution. 19 %test_quotes(); MLOGIC(TEST_QUOTES): Beginning execution. MLOGIC(TEST_QUOTES): Parameter TITLE has value SYMBOLGEN: Macro variable TITLE resolves to MLOGIC(TEST_QUOTES): %IF condition "&title" = "" is TRUE MLOGIC(TEST_QUOTES): %LET (variable name is TITLE) MLOGIC(TEST_QUOTES): %PUT SPECIAL: TITLE is "&title" SYMBOLGEN: Macro variable TITLE resolves to Default title SPECIAL: TITLE is "Default title" MLOGIC(TEST_QUOTES): Ending execution. ERROR: Errors printed on page 1. ERROR: Errors printed on page 1. ERROR: Errors printed on page 1. NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 0.16 seconds cpu time 0.10 seconds