DATA Step, Macro, Functions and more

%WINDOW, cannot control window size or position

Accepted Solution Solved
Reply
Contributor
Posts: 74
Accepted Solution

%WINDOW, cannot control window size or position

Hi, 

 

Anyone know why ROW and COLUMN might not work?  I use simple UI windows like this and ROWS, COLUMNS, IROW and ICOLUMN have never worked for me.  They just appear full-screen no matter what. 

 

** DEFINE UI WINDOW **;
%window cont1 color=green rows=10 columns= 40
#4 @10 "CONTINUE?: " cont 1 attr=underline attr=rev_video autoskip=Y
#6 @10 "Enter N to stop";

** CALL THE WINDOW AND CONTINUE IF DESIRED **;
%macro call_window ;
%let cont = Y;
%display cont1;
%if &cont = N or &cont = n %then
%do;
%abort cancel;
%end;
%mend;

 

%call_window;

 

I'm using SAS 9.2 on PC.

 

Thanks.


Accepted Solutions
Solution
‎09-27-2016 10:47 AM
Super User
Posts: 11,343

Re: %WINDOW, cannot control window size or position

Try this:

Ensure that he Editor window is NOT maximized to fill the SAS display area. Then try the %call_window macro.

I think the %window command may inherit the property of maximized if the editor is.

View solution in original post


All Replies
Super User
Posts: 11,343

Re: %WINDOW, cannot control window size or position

You may need to check your log. I got an ERROR on the value you provide for AUTOSKIP.

 

After correcting the error on autoskip I see a window that is the specified size and honors IROW though it wants to appear behind my LOG window.

 

That is running 9.2 on Windows 7. 

 

 

Contributor
Posts: 74

Re: %WINDOW, cannot control window size or position

[ Edited ]

Thanks for testing it.  I corrected the error (Y->YES) and I still get full screen.  I'm using Windows 7 too.  Oh well. 

 

In fact autoskip doesn't do anything in this case, so I took it out. 

Solution
‎09-27-2016 10:47 AM
Super User
Posts: 11,343

Re: %WINDOW, cannot control window size or position

Try this:

Ensure that he Editor window is NOT maximized to fill the SAS display area. Then try the %call_window macro.

I think the %window command may inherit the property of maximized if the editor is.

Contributor
Posts: 74

Re: %WINDOW, cannot control window size or position

You're right!! Mystery solved!  I always maximize the program editor and other windows.  It makes me crazy the way SAS resizes them automatically. Thank you!  I wish I could override that so that just this one is not maximized.  

Super User
Posts: 11,343

Re: %WINDOW, cannot control window size or position

It took me a bit to figure it out because I almost never maximize any window regardless of application.

 

You might be able to incorporate the ZOOM command into your macro to turn maximization off. Might. DM commands seem to get flakier with each Windows "upgrade" so if you are using Windows it may take some experimentation. I suspect the macro would contain the open window bit and then zoom off but that's a guess at this point.

 

Contributor
Posts: 74

Re: %WINDOW, cannot control window size or position

Ok, thanks for your help.  

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 443 views
  • 1 like
  • 2 in conversation