I would like to use a macro to create many bat files that contain quoted strings of text in order to execute another program using the command prompt. For example, I want my bat file to consist of a single line with two quoted strings (one constant string and one string depending on macro variable, separated by an unquoted less than sign), such as "some constant text here" < "text here from macro variable"; I have tried various combinations of single and double quotation marks in the put statement in code similar to this: %let variable_text = text that can change here; data _null_; file "filepath\test.bat"; put ' "some constant text here" <' "&variable_text"; run; The issue is both resolving the macro variable and retaining the quotation marks. Based on the variations I'm trying, the macro variable does not resolve, or the macro variable does resolve but the quotation marks are not retained in the output bat file. I have looked at this article with no success: https://support.sas.com/resources/papers/proceedings15/2221-2015.pdf Thanks in advance for your help!
... View more