01-29-2018 02:00 AM
I am working with SAS EG and DI Studio. I have one report where out put is in Excel format and to run the code I am using DI Studio for prompt creation. Now the situation is like, due to the short storage I am not able to create the output, it is showing some error in the log. The way out is like if select some less selection then the error is not coming. Is there any way where If I will get that error, parallel way I will get some mail stating like due to my selection this is happening, I have to select some less selection. Because if I am user I can not see the log. As an user I can see only the portal page created by DI Studio.
REF: The error is "SAS System stopped processing this step because of insufficient memory."
I hope I am able to make you understand.
Would you please suggest me one way to fix the issue.
NOTE: I can not change the output location or the size of the location.
01-29-2018 04:55 AM
"SAS System stopped processing this step because of insufficient memory"
doesn't look like you are running out of disk space, this looks like not enough main memory available to the process.
How do you create your Excel output?
Basically, I would structure my prompt(s) in such a way that invalid selections are rejected at input. Or it's possible to solve the issue by using more efficient code.
01-29-2018 06:13 AM
Thanks for your feedback. My issue is related to main memory. My prompt is fine. but database is quite big. so If I will go with all selection, this will come. I want to go with some different way. So that's why I am looking for this mail sending way. Can you help me with a suitable solution for this specific error.
01-29-2018 06:42 AM
Determine the amount up to which the STP works; then, after the prompt has been given, check the values if they are still in executable range, and if not, display a message and restart the STP.
It's always better to avoid ERRORs in the first place than to wait for the crash. Just imagine the frustration if a user who waits 15 minutes just to get a "doesn't work". Much better to get "only X selections allowed" immediately.
01-29-2018 07:15 AM
Exactly, I am agree with you. I already discussed this option to higher authority. But as per them I can not do anything new with the prompt now, also we can not fix the output range also. Then I asked for this email option. They agree to this. I am using this code
%macro errmail; %if &syserr NE 0 %then %do; data _null_; file myfile; put 'Your job received the following ERROR/WARNING message:'; put; put 'ERROR was:'; put "&syserrortext"; put; put 'WARNING was:'; put "&syswarningtext"; run; %end; %mend errmail;
And this is running smooth sending me mail. But when I am specifying the error instead of count like
filename myfile email to= "EXTERN.ROY_SOURAV@ALLIANZ.COM" subject= "Error in Report" type= "text/plain"; %macro errmail; %if &syserr = "180-322: Statement is not valid or it is used out of proper order." %then %do; data _null_; file myfile; put 'Your job received the following ERROR/WARNING message:'; put; put 'ERROR was:'; put "&syserrortext"; put; put 'WARNING was:'; put "&syswarningtext"; run; %end; %mend errmail;
I am not getting any mail. I feel due to not able to read the error not sending me mail. Can you help me with this?
01-29-2018 07:20 AM
Maxim 1: Read the documentation, in this case the documentation for the automatic macro variable syserr, and its possible contents:
01-29-2018 09:07 AM
Can you tell me what is the reason behind, my second code given in the above comment not working? Any better suggestion you have I can complete my work more easily.
I will be grateful.