The Entire Macro is shown below. I just cannot understand it... /*========================================================================================*/ /* */ /* macro: sas_title */ /* */ /* -------------------------------------------------------------------------------------- */ /* */ /* notes: 1. This sas macro is designed to display a sas title box to */ /* the sas log. */ /* */ /* 2. This sas macro may display the following parameters: */ /* */ /* 3. By default the routine display the date and time only. */ /* */ /* parms: 1. macro = a macro name specified by the user. */ /* 2. step = a step number specified by the user. */ /* 3. msg1 = a customer message. */ /* 4. msg2 = a customer message. */ /* 5. msg3 = a customer message. */ /* 6. msg4 = a customer message. */ /* 7. msg5 = a customer message. */ /* 8. msg6 = a customer message. */ /* 9. msg7 = a customer message. */ /* 10. msg8 = a customer message. */ /* 11. msg9 = a customer message. */ /* */ /*========================================================================================*/ %macro sas_title( server = NO, macro = , title = , step = , msg1 = , msg2 = , msg3 = , msg4 = , msg5 = , msg6 = , msg7 = , msg8 = , msg9 = ); /*========================================================================================*/ /* */ /* step 00010 Convert server switch to upper case ( YES/NO ) */ /* */ /*========================================================================================*/ %let server = %upcase(&server.); /*========================================================================================*/ /* */ /* step 00020 Create display date and time */ /* */ /*========================================================================================*/ %let display_date = %sysfunc( date(), weekdate. ); %let display_time = %sysfunc( time(), time.); /*========================================================================================*/ /* */ /* step 00030 Send sas macro parms to sas server. */ /* */ /*========================================================================================*/ %if &sysscp. = WIN and &server. = YES %then %do; %syslput server = &server.; %syslput title = &title.; %syslput msg1 = &msg1.; %syslput msg2 = &msg2.; %syslput msg3 = &msg3.; %syslput msg4 = &msg4.; %syslput msg5 = &msg5.; %syslput msg6 = &msg6.; %syslput msg7 = &msg7.; %syslput msg8 = &msg8.; %syslput msg9 = &msg9.; rsubmit; %end; /*========================================================================================*/ /* */ /* step 00040 Display the SAS title box to the sas log. */ /* */ /*========================================================================================*/ %put; %put NOTE: &dline.; %put NOTE: ; /*----------------------------------------------------------------------------------------*/ /* step 101 Display the optional SAS Macro Name. */ /*----------------------------------------------------------------------------------------*/ %if %nrbquote(¯o.) ne %str( ) %then %do; %put NOTE: Macro: ¯o.; %put NOTE: ; %put NOTE: ; %end; /*----------------------------------------------------------------------------------------*/ /* step 102 Display the optional SAS Step Number and title. */ /*----------------------------------------------------------------------------------------*/ %if %nrbquote(&step.) ne %str( ) and %nrbquote(&title.) ne %str( ) %then %do; %put NOTE: Step: &step. &title.; %put NOTE: ; %put NOTE: ; %end; %if %nrbquote(&step.) eq %str( ) and %nrbquote(&title.) ne %str( ) %then %do; %put NOTE: &title.; %put NOTE: ; %put NOTE: ; %end; /*----------------------------------------------------------------------------------------*/ /* step 103 Display the mandatory Date and Time. */ /*----------------------------------------------------------------------------------------*/ %put NOTE: Date: &display_date.; %put NOTE: ; %put NOTE: Time: &display_time.; %put NOTE: ; /*----------------------------------------------------------------------------------------*/ /* step 104 Display the optional message number 1. */ /*----------------------------------------------------------------------------------------*/ %if %nrbquote(&msg1.) ne %str( ) %then %do; %put NOTE: Notes:; %put NOTE: ; %put NOTE: 1. &msg1.; %put NOTE: ; %end; /*----------------------------------------------------------------------------------------*/ /* step 105 Display the optional message number 2. */ /*----------------------------------------------------------------------------------------*/ %if %nrbquote(&msg2.) ne %str( ) %then %do; %put NOTE: 2. &msg2.; %put NOTE: ; %end; /*----------------------------------------------------------------------------------------*/ /* step 106 Display the optional message number 3. */ /*----------------------------------------------------------------------------------------*/ %if %nrbquote(&msg3.) ne %str( ) %then %do; %put NOTE: 3. &msg3.; %put NOTE: ; %end; /*----------------------------------------------------------------------------------------*/ /* step 107 Display the optional message number 4. */ /*----------------------------------------------------------------------------------------*/ %if %nrbquote(&msg4.) ne %str( ) %then %do; %put NOTE: 4. &msg4.; %put NOTE: ; %end; /*----------------------------------------------------------------------------------------*/ /* step 108 Display the optional message number 5. */ /*----------------------------------------------------------------------------------------*/ %if %nrbquote(&msg5.) ne %str( ) %then %do; %put NOTE: 5. &msg5.; %put NOTE: ; %end; /*----------------------------------------------------------------------------------------*/ /* step 109 Display the optional message number 6. */ /*----------------------------------------------------------------------------------------*/ %if %nrbquote(&msg6.) ne %str( ) %then %do; %put NOTE: 6. &msg6.; %put NOTE: ; %end; /*----------------------------------------------------------------------------------------*/ /* step 110 Display the optional message number 7. */ /*----------------------------------------------------------------------------------------*/ %if %nrbquote(&msg7.) ne %str( ) %then %do; %put NOTE: 7. &msg7.; %put NOTE: ; %end; /*----------------------------------------------------------------------------------------*/ /* step 111 Display the optional message number 8. */ /*----------------------------------------------------------------------------------------*/ %if %nrbquote(&msg8.) ne %str( ) %then %do; %put NOTE: 8. &msg8.; %put NOTE: ; %end; /*----------------------------------------------------------------------------------------*/ /* step 112 Display the optional message number 9. */ /*----------------------------------------------------------------------------------------*/ %if %nrbquote(&msg9.) ne %str( ) %then %do; %put NOTE: 9. &msg9.; %put NOTE: ; %end; /*----------------------------------------------------------------------------------------*/ /* step 113 Display the end of the message box. */ /*----------------------------------------------------------------------------------------*/ %put NOTE: &dline.; %put; /*========================================================================================*/ /* */ /* step 113 Display the end of the message box. */ /*========================================================================================*/ %if &sysscp. = WIN and &server. = YES %then %do; endrsubmit; %end;
... View more