How to add input box to sas sql query which ask user about parameter ? (Something aka Access input box) (in Enterprise Guide)
Here is a solution using BASE -
You could use the %Window procedure with the %display
DATA _NULL_;
%LET BATCH1=;
%WINDOW BATCH_ANALYSIS COLOR = WHITE
ICOLUMN = 30 IROW = 11
COLUMNS = 88 ROWS = 20
#1 @28 "CLIENT BATCH REPORT"
#4 @12 "Date must be entered YYYY-MM-DD Format, ascending order."
#6 @28 "Example = '2015-01-31'"
#9 @5 "Enter Batch Date - [ENTER] when complete:"
#11 @5 BATCH1 12 attr=underline
#13 @5 "Reports will be written to 'location'";
%DISPLAY BATCH_ANALYSIS;
STOP;
RUN;
%put %batch1;
This above is an example of using the "user input" to operate on your query/data step. In this case, I am prompting the user to enter a date, which creates that string value as a macro variable that can be passed anywhere in your SAS code (I am only using the string date format because it gets passed to an RSUBMIT in a DB2 environment). May be a good idea to play with the Input Lines/etc to display the text you want in your prompt window...
Are you using Enterprise Guide? If thats the case, you can create prompts which will create macro variables when you run your code. You will just have to use those macro variables in your code.
Right click your program > Properties > Prompts > Prompt Manager and so on. Have a look at it and see if it solves your problem.