- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi There,
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.
Thanks,
KP
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
FILENAME t "c:\temp\fin.js";
DATA _null_;
FILE t;
PUT 'WScript.Echo("Program Done!")';
RUN;
X "c:\temp\fin.js";
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Whilst your not wrong, there are methods outside of SAS to do that, such as you using javascript, how do you know that your program is actually done? Has it run correctly, are all necessary file produced, is that vital update to the database complete etc. Only by examining logs and returns would one validate that. You could just pop the batch in a scheduler program and have the do it, that would tell you the program in question has return a finish code, but it still leaves the whole successful operation question open.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Yes, you are right.
I just want that process is run and job is done. i want this for Non SAS user, who just run my code and at the end they get such type of messagge.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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).