BookmarkSubscribeRSS Feed
Kpatel306
Calcite | Level 5

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

7 REPLIES 7
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

rcwright
Calcite | Level 5


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.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

rcwright
Calcite | Level 5

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

.

Kpatel306
Calcite | Level 5

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.

SASKiwi
PROC Star

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.

jakarman
Barite | Level 11

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).

---->-- ja karman --<-----

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 5495 views
  • 0 likes
  • 5 in conversation