I'm trying to execute a macro with parameters. One parameter I can hard code, but the other will change with each run. Is there a way that I can do this? Can I do an embedded sql with the exec statement?
Assuming that you're using BTEQ, you can do a BTEQ "import" and import the value for your second parameter from a file. I believe that you can also do this in SQL Assistant with the import feature there. In the case of SQL Assistant, you specify a "?" whereever you are bringing the parameter in from a file. Example: