2 weeks ago
I have a program some thing like below (and the file is added to a source control)
%let data = source.adsl;
%let var = age;
%let proc_to_run = mean;
%if &proc_to_run eq mean %then %do;
proc means data = &data;var &var;run;
%else %if &proc_to_run eq freq %then %do;
proc freq data = a;table &var;run;
%else %put selected procedure is invalid;
To, change the parameter values I need to check out and check in the program every time.
To avoid that, i taught to enter the values during the execution time by prompting a window with three parameters.
One for input dataset, second is for analysis variable and third is for procedure to execute (by listing the available procedures).
I found the below code on net,
** This code is for the SAS windowing environment only. **/ /** %WINDOW defines the prompt **/ %window info #5 @5 'Please enter userid:' #5 @26 id 8 attr=underline #7 @5 'Please enter password:' #7 @28 pass 8 attr=underline display=no; /** %DISPLAY invokes the prompt **/ %display info; %put userid entered was &id; %put password entered was &pass;
Which is suitable for windows environment. Is there anyway to achieve the same in UNIX environment ?
2 weeks ago
I tried but that is not working when I run on unix server.
Can you provide some more details about the x-windows and how you have achieved...
Thanks in Advance,
a week ago
How are you starting SAS. Normally I open a X terminal window on the UNIX server (running sas xterm, dtterm, etc).
When you do that you should have an environment variable named DISPLAY that should look something like hostname:n where hostname is the name of the host where your X Windows Server software is running and the number after the colon is which screen on that X windows server your terminal is running. Then to run SAS interactively you just type the command sas at the command prompt.
If instead you just have a X windows server running, but you are not running a X windows compatible terminal window then you might need to add the -display option to the command line to tell SAS what X windows screen to open the interactive SAS windows.