07-03-2014 09:06 AM
Anyone have any idea about how can we create a Message Box in SAS as we do in Excel VBA?
I want to pop up a message like "Program is Completed" at the end of my program, so that person who dont know SAS and running my SAS projects, can get to know that prcess is finsihed now.
07-03-2014 09:23 AM
There isn't such a thing. The nearest thing would be %WINDOW. I would suggest the person running the program or checking that it had finished/executed in a correct manner, should be checking the output log, which you are storing somewhere right? In the log they would be checking for errors/warnings and other considerations, and perhaps you could put out to the log a message for finished.
07-03-2014 10:36 AM
FILENAME t "c:\temp\fin.js";
PUT 'WScript.Echo("Program Done!")';
LInk to wscript: http://msdn.microsoft.com/en-US/library/ec0wcxh3.aspx
Message was edited by: Richard Wright wscript is case sensitive. As written before, it will fail - the wscript.echo needs to be WScript.Echo. I inadvertantly changed the case because I couldn't copy/paste my code into the editor, and changed it while typing. My Bad. Change that and the code will run in either SAS interactive or batch or EG.
07-03-2014 10:48 AM
07-03-2014 11:28 AM
Guess I replied to RW9, instead of the original post - sorry, Blame it on inexperience.
Seems to me the issue is notification that the code has run - whether correctly or incorrectly is another matter altogether.
I agree that review of the log, as well as the results is imperative irrespective of whether a vba-like message box is popped or not.
This is meant a simple demonstation to a simple question of how to notify that the process is done.
And yes, I am assuming here that the code hasn't multi-threaded and that one thread finished before another, but there are ways to check this
07-03-2014 08:18 PM
It is not clear from your original post if you are running SAS from EG or not. If you are then %WINDOW or DATA step WINDOW will not work as SAS is running behind the scenes on a server.
If you are running SAS in a local SAS Display Manager session then %WINDOW or DATA step WINDOW will work and is quite trivial to set up a display message.
07-04-2014 01:31 AM
Do not focus on the batch processing of excel with via as that is an interactive environment.
Interactive is meaning somebody is needing to watch that screen all the time.
You are needing a message notification when the job is done? Use a message mail or so. When you can connect authorized to a mail provider this is a normal way being present in lsf and to be coded scripted including the cc (completion code).