<i>How can I run this process without prompting for the variable?</i>
You bypass prompting by supplying values for the replacement variables. In your example, you pass in a value for a replacement variable named &CUST; but the only replacement variable in your QM query is named &SELECT.
You might change your STRQMQRY SETVAR() parameter to be:<pre>
SETVAR(( SELECT &SELEC ))</pre>
Or you might change your QM query to be:<pre>
where cust = &CUST</pre>
Change one or the other (or both) so that they match.
Note that replacement variable names are case-sensitive; that is, &SELECT is different from &select. Also note that quotes around replacement variables must be supplied by your program; that is, if column CUST is a CHAR column, your program <b>must</b> supply quotes before the QM query can run — you <b>cannot</b> have your QM query look this way:<pre>
where cust = ‘&SELECT’</pre>
If you code that way, the &SELECT replacement variable will be assumed to be a literal constant rather than a replacement variable; it won’t be replaced with a value.