DATA Step, Macro, Functions and more

sas macro program send a popup boxe message

Reply
Super Contributor
Posts: 371

sas macro program send a popup boxe message

Hello experts,

 

Please, I want to send a popup boxe message, if the length of macro-variable more than a fixed lengths.

 

%let use_name=Bob; /* Max length of user_name  must be 15 */

%let user_id=8562;   /*  Max length of user_id  must be 4  */

 

 

%macro check ;

%if   (%length(&use_name)<16 &  %length(&use_id)<5) %then %do;

%treatment;

%end;

%else %do;

 

/*send a popup boxe message to the user */

%end;

 

%mend check;

%check;

 

 

 

 

 

 

 

%mend check;

 

 

SAS Super FREQ
Posts: 8,743

Re: sas macro program send a popup boxe message

Hi:

  You could investigate %WINDOW and %DISPLAY, but they might have limited use depending on your configuration and how you are using SAS.

 

  If you are using the BI Platform and stored processes, then you could use the prompting framework to prompt and validate input from users.

 

  As you can see from the documentation example, http://support.sas.com/documentation/cdl/en/mcrolref/69726/HTML/default/viewer.htm#n0ojc9rtfrzvbdn16... the %WINDOW and %DISPLAY don't work in EG or SAS Studio.

try_window_display.png

 

  EG and SAS Studio both have other ways to collect input from users. (EG has the prompting framework and SAS Studio allows you to generate custom tasks.)

 

cynthia

Super Contributor
Posts: 371

Re: sas macro program send a popup boxe message

@Cynthia_sas : Thank you for your answer.

As you said, I have tried before  %WINDOW and %DISPLAY, but It does not work, because I work in EG and SAS 9.2.

So, please I need more information about the "prompting framework for EG and SAS 9.2"  ? or any simple idea without framework ?

 

 

SAS Super FREQ
Posts: 8,743

Re: sas macro program send a popup boxe message

Hi, These papers from 2010 might be useful:
http://support.sas.com/resources/papers/proceedings10/036-2010.pdf
http://support.sas.com/resources/papers/proceedings10/041-2010.pdf

If you do NOT have the capability to create Stored Processes, then you won't be able to do everything, but the basic prompting framework is there in EG 4.2 to use.

cynthia
Super Contributor
Posts: 371

Re: sas macro program send a popup boxe message

@Cynthia_sas : Thank you, that's very kind from you .

Ask a Question
Discussion stats
  • 4 replies
  • 177 views
  • 4 likes
  • 2 in conversation