如何将输入框添加到向用户询问参数的 sas sql 查询中? [英] How to add input box to sas sql query which ask user about parameter?
问题描述
如何将输入框添加到询问用户参数的 sas sql 查询中?(又名访问输入框)(在企业指南中)
How to add input box to sas sql query which ask user about parameter ? (Something aka Access input box) (in Enterprise Guide)
推荐答案
这里是一个使用 BASE 的解决方案 -
Here is a solution using BASE -
您可以将 %Window 过程与 %display
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;
以上是使用用户输入"对查询/数据步骤进行操作的示例.在这种情况下,我提示用户输入一个日期,该日期将创建该字符串值作为宏变量,可以在您的 SAS 代码中的任何位置传递(我只使用字符串日期格式,因为它在一个DB2 环境).使用输入行/等在提示窗口中显示您想要的文本可能是个好主意...
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...
这篇关于如何将输入框添加到向用户询问参数的 sas sql 查询中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!