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.
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.
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.
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.
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.
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.
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.
Ok, thanks for your help.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.