gdogg371
gdogg371

Reputation: 4122

Clear inputs from SAS %Window function

I am using SAS version 9.2 and have the following piece of code that aborts a job run through based upon some conditional input from the end user:

%WINDOW flowmng
ICOLUMN= 15 IROW= 10
COLUMNS= 80 ROWS= 20
"<Have you checked that all three Flow Manager jobs have completed successfully?>"

#5 @15 "Type 'Yes' for yes or 'No' for no, THEN press
[ENTER]"

#9 @23 "Flow Manager jobs run?" @48 resp 3
ATTR=UNDERLINE REQUIRED=YES
;

%MACRO macronam ;
%LET null = ;
%LET resp2 = %UPCASE(&resp);
%DISPLAY flowmng ;
%IF (&resp2 eq YES) %THEN %DO;
%END;
%IF (&resp2 eq NO) %THEN %DO ;
%ABORT;
%END ;
%MEND macronam ;
%macronam;

This all works great apart from the fact that when I reopen the window, the user input from the last job is still there. I've tried looking for the %WINDOW option to reset all fields, but I cannot seem to find it in the documentation I have read.

Does anyone have the syntax for this?

Thanks

Upvotes: 1

Views: 248

Answers (1)

Joe
Joe

Reputation: 63424

It's using the value of &resp, so just add

%let resp=;

before the %WINDOW call.

Upvotes: 2

Related Questions