I have a SAS program that is called through VBA. Is it possible to build in code that checks if there were any errors in the SAS log and then, if there were, export them to the Excel sheet from where the code is called?
EDIT: Suppose I have a SAS macro named %MACRO
. then I would call:
For i = 1 To N
OleSAS.Submit("%MACRO(inputs(i))")
Next i
Excel seems to run this irrespective of whether the "MACRO" macro contains errors. I would like to include functionality to output the SAS log in the case that there is an error in the "MACRO" macro