06-22-2015 04:33 PM
Hello all members,
I would like to thank you all who are able to give me a hint or advice how to solve my current issues im facing.
My issue is regarding errror gathering to one place (variable,..).
Question is, if there exist any special variable, options settings or whatever what could help me to gather of all errors, which happened in e.g. macro.
Currently Im using system variables &syserr and & syserrortext but i am able to handle only last error and if happened any errors before the last one, im not able to retreive information regarding it.
Thank you very much
06-22-2015 07:02 PM
In EG 6.1 or higher, a log summary is produced which lists all of the log warnings, errors and notes - in one place.
Why try doing it for yourself when SAS has done it for you? If you don't have at least EG 6.1 you can easily request it from SAS.
06-22-2015 07:17 PM
The thing is that i have stored process where a include several files of macros. I run this stored process from external application through ws. I thought that there can be some workaround or functionallity, which could help me to return list of errors from executed macros to external application. I really would like to avoid parsing log summary :smileyshocked:
06-23-2015 08:07 AM
The thing is that we use an external tool in cooperation with SAS database. We call through web services stored processes created in SAS EG. Stored processes contain source code with included other macro file. When we call ws, stored process starts and if any error in macro file occur, we would like to return it to user in external tool. We are able only to catch last error and it is kind of unpleasant to return it one by one.
06-24-2015 04:09 AM
If I understand your requirements correctly then I don't think there is a generic way to trap all possible errors and return them users as a list. One possibility might be to run your stored processes with the SAS option ERRORABEND. This will cause SAS to abort when it gets an error, so you will only ever get one error with your job. The web service interface should then at least report a general failure message. Others who have used stored processes more might be able to offer further advice.