If this program is tried it does what I am talking about.
/***********************************************************
PROGRAM NAME: New_Daily.sas
DESCRIPTION: Daily Spreadsheet on PC
DATE: June 2010
************************************************************/
dm 'clear log; clear output';
options mprint symbolgen; * mlogic;
/*options xwait xsync; */
%global filnme mypath newdir newdrive mydir mmmyy mth year4 ;
%let filnme = %sysget(SAS_EXECFILENAME);
%let xpath = %sysget(SAS_EXECFILEPATH);
%let mypath = %substr(&xpath,1,%length(&xpath)-%length(&filnme));
%let locvalue = &sysdate9;
%let yr = %substr(&locvalue,8,2);
%let yr4 = %substr(&locvalue,6,4);
%let mmm = %lowcase(%substr(&locvalue,3,3));
%put &mmm&yr4;
%macro START;
/**************************************************************/
/* This displays a window; that allows the user to select */
/* the month and year wanted for the Daily Checkin Report. */
/**************************************************************/
%window month color=gray
#5 @3 "Date of Access: &sysday, &sysdate.."
#10 @23 "DAILY CHECKIN SHEET" ATTR=underline
#15 @20 "Select this Month and Year"
#17 @25 "to Process:"
@46 mmm 3 protect=yes
@50 yr 2 protect=yes
#19 @25 "or Choose another"
#20 @25 "Month and Year:"
@46 mmm 3 attr=underline @50 yr 2 attr=underline
#23 @20 "Press" @26 "ENTER" attr=underline
@32 "when ready to Continue.";
%display month;
%mend START;
%put Month to Process is: &mmm;
%put Year to Process is: &yr;
data _null_;
call symput('curmth',"&mmm");
run;
/*options xwait xsync; */
%macro noexectest(condition=, /* condition assessed */
msg=); /* message to display in log if condition met */
%global noexecmacroend;
%if %unquote(&condition) %then %do; %* check user condition, if true;
%let noexecmacroend=; %* uncomment mend statement;
%put %sysfunc(repeat(*,55)); %* display message;
%put %upcase(&msg);
%put %sysfunc(repeat(*,55));
%unquote(%nrstr(%macro noexecdummy;)); %* and start dummy macro;
%let a=%nrstr(%mend);
%end; %* [This dummy macro includes all statements until mend];
%* [These statements will not be run];
%else
%let noexecmacroend=* ; %* else keep mend stmt commented;
%mend;
%START; * Display the %Window;
%noexectest( condition=%str(&syserr ne 0),
msg= RC=&syserr - Start of Program Errored!);