If I understand correctly, what you would need is a SQL parser. From there, you could use the syntax tree to generate the Query Builder components and/or movements if simulating a UI.
SQL parsing is not a trivial task. Combine that with the fact that SAS SQL is a different syntax than just ANSI SQL and you have a real challenge.
Ultimately, it will be far more work for you to do the parsing. You can look at generic parsers for SQL but they tend to be specific. After getting the statements parsed out, you then need to automate the query building process. Better SQL parsers are very, very expensive.
If you have repetitive tasks that can be logically described in a UI, use UiPath and script the human movement. UiPath is an RPA tool and can dramatically speed up repetitive manual tasks. You should be able to use their desktop version. Takes a bit of getting used to but you will never go back to manual, repetitive tasks again. Wonderful product.
... View more