BookmarkSubscribeRSS Feed
mdavidson
Quartz | Level 8

I've been using Don Henderson's "please wait" example macro (http://www.sascommunity.org/wiki/Generating_Descriptive_Please_Wait_Messages_for_Long_Running_Stored...)

 

One issue I'm having is that the "Step 1, 2, 3 Completed.." message is not overwriting the previous message.  So in other words when the stored process is completed I still see all of the previous "please wait" messages.

 

I'm wanting to overwite each one of those messages and just display the final result when the stored process is completed.  I've tried to wrap the output in %stpbegin and %stpend, but so far no luck.

 

For example:

 

Did not work:

%stpbegin;

%PleaseWaitExample;

%stpend;

6 REPLIES 6
DonH
Lapis Lazuli | Level 10

A couple of questions.

Are you trying to run the example from the link? If so, is that what is not working?

What release of SAS are you using? The html/javascript that hides the previous messages is written using ODS HTML text= and I have seen issues with how such messages are being written by ODS in 9.4. If that is the issue, I believe there is a tech note about that. I can try to find that. I also have the proc template code that Technical Support provide that might help.

mdavidson
Quartz | Level 8

Thanks for the reply Don -- yes I am using SAS 9.4 I'll try and look up the note.

mdavidson
Quartz | Level 8

I found the thread -- https://communities.sas.com/t5/SAS-Stored-Processes/STP-javascript-generation-9-3-vs-9-4/td-p/261573

 

Not as elegant as your original design but it works 😕

DonH
Lapis Lazuli | Level 10

Quentin's solution works. But i was thinking of another thread that was not specific to the "Please Wait" example.

 

I worked with TS on a related issue where JavaScript written by ODS HTML TEXT= was not working. TS provided some template code so the generated tags did not include table tags. That restored the JavaScript functionality.

I don't have access to that code right now as it is at a client site. But I will check with TS about it and hopefully he can post it here.

By running that code and using the template it creates, I suspect the Please Wait routine will work as is.

Quentin
PROC Star

I ended up switching to use PROC ODSTEXT in 9.4, which does not get put inside a <TA BLE> tag, something like:

 

  proc odstext;
    p "<span id=""pleaseWait"">
       &message <p>
       <img src=""/SASStoredProcess/images/progress.gif"">
       </span>
      "
    ;
  run;

 

But I like Don's idea of modifying the template to allow continued use of ODS HTML text.  That would be helpful to avoid rewriting some of my legacy code.

Check out the Boston Area SAS Users Group (BASUG) video archives: https://www.basug.org/videos.
DonH
Lapis Lazuli | Level 10

I found the proc template code that allows this to work. Note however that the macro source needs to be updated to replace:

 

ods html text = '        ';

 

with

 

ods tagsets.html4 text = '       ';

 

That is the only needed change.

 

Here is the proc template code that I got to work. Note that I freely acknowledge that I am not at all at expert in PROC TEMPLATE. This code was originally provided to me by Tech Support for a related issue. And I was able to tweak it for this example.

 

ods path work.tmplmst(update) sashelp.tmplmst(read);

proc template;

edit tagsets.html4;

define event text;

start:

trigger rowcol;

trigger cell_value;

finish:

trigger cell_value;

end;

end;

run;

SAS INNOVATE 2024

innovate-wordmarks-white-horiz.png

SAS is headed back to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team.

Interested in speaking? Content from our attendees is one of the reasons that makes SAS Innovate such a special event!

Submit your idea!

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 6 replies
  • 2112 views
  • 1 like
  • 3 in conversation