Help using Base SAS procedures

Error gathering

Reply
New Contributor
Posts: 3

Error gathering

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

Richard

Super User
Posts: 3,106

Re: Error gathering

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.

New Contributor
Posts: 3

Re: Error gathering

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:

thank you

RIchard

New Contributor
Posts: 3

Re: Error gathering

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.

Thank you

Richard

Super User
Posts: 3,106

Re: Error gathering

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.  

Ask a Question
Discussion stats
  • 4 replies
  • 271 views
  • 0 likes
  • 2 in conversation