BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I have a piece of code that I want to execute only if a certain user-defined value is met. I wanted to set that user-defined value via a message box. Does anyone know of an "easy" way to create a message box in SAS or a way to execute code conditionally based on a user-defined value? Currently I hard-code the value and highlight which code I want to run based on that value.
3 REPLIES 3
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Some important info: What SAS version, what OS platform used, whether you are executing the SAS application locally or on a remote server, and whether the SAS processing occurs interactively or batch mode?

Scott Barry
SBBWorks, Inc.
deleted_user
Not applicable
Version 9.1.3, OS = Windows 5.1.2600, executing the app locally on my client, interactive SAS

Thanks
ChrisNZ
Tourmaline | Level 20
have you looked at %window?
[pre]
%let var=;
%window welcome color=white
#5 @28 'Welcome to SAS.' attr=highlight color=blue
#7 @15 "You are executing Release &sysver on &sysday, &sysdate.."
#9 @15 'What is your name? ' var 20 attr=rev_video c=blue required=yes
#12 @29 'Press ENTER to continue.';
%display welcome;
%put The name is &var.;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 3 replies
  • 1936 views
  • 0 likes
  • 3 in conversation