using stored process, I want to create a popup window with message based on condition .
i have tried with file _webout, but it didnt work. your help would be much appreciated in this
Hi,
Maybe you could try using Javascript..
I cannot test the below code.. But you could try it out
data _null_ ;
file _webout ;
val = '<script type="text/JavaScript">alert("MY MESSAGE HERE ")</script>';
put val;
run;
Hope it helps
Thanks a lot for your response.
I am getting insufficient authorisation on as below, its routing to /opt/app/SAS/config/Lev1/SASApp/_webout.dat by default
16 data _null_ ;
17 file _webout ;
18 val = '<script type="text/JavaScript">alert("MY MESSAGE HERE ")</script>';
19 put val;
20 run;
ERROR: Insufficient authorization to access /opt/app/SAS/config/Lev1/SASApp/_webout.dat.
Hi I am getting popup message while using below code.
data _null_ ;
file _webout ;
val = '<script type="text/JavaScript">alert("MY MESSAGE HERE ")</script>';
put val;
run;
but getting error while using macro variable in above alert.
%let Trigger_Button = ALL Buttons;
24 +
25 + data _null_ ;
26 + file _webout ;
27 + val = "<script type='text/JavaScript'>alert( "&Trigger_Button." )</script>";
28 + put val;
29 + run;
30 +
31 +
32 +%mend;
33 +%mail1;
The SAS System
NOTE: Line generated by the macro variable "TRIGGER_BUTTON".
33 "<script type='text/JavaScript'>alert( "ALL Buttons
___________________________________________
49 388
76
NOTE 49-169: The meaning of an identifier after a quoted string may change in a future SAS release. Inserting white space between a quoted string and the succeeding identifier is recommended.
ERROR 388-185: Expecting an arithmetic operator.
ERROR 76-322: Syntax error, statement will be ignored.
Any one help me how to use macro variable along with comment in above
Try this..
%let message = test;
data _null_ ;
file _webout ;
val = cat('<script type="text/JavaScript">alert(" ', "&message",' ")</script>');
put val;
run;
Hi,
You might want to the code below. Haven't test this one though..
If you want more flexible conditioning on how you want to display your html, you can also use the _webout with put statements although i think it's a bit messy once your code once becomes long.
Hope this helps,
Milton
data _null_;
format infile $char256.;
input;
infile = resolve(_infile_);
file _webout;
put infile;
cards4;
<HTML>
<BODY>
<script type="text/javascript">
alert("&MESSAGE.");
</script>
</BODY>
</HTML>
;;;;
run;
Thanks a lot foryour reponse.
I am getting insufficient authorisation access when i am using this code.
15
16 %let MESSAGE =SUNIL;
17 data _null_;
18 format infile $char256.;
19 input;
20 infile = resolve(_infile_);
21 file _webout;
22 put infile;
23 cards4;
ERROR: Insufficient authorization to access /opt/app/SAS/config/Lev1/SASApp/_webout.dat.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
31 ;;;;
run;
Hi
Just check a few things ..
When you modify your stored process ensure you have selected stored process server...
There will two checkboxes one for transient package and the other for Streaming output... Ensure to check only the Streaming output and uncheck the transient package.
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
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.
Ready to level-up your skills? Choose your own adventure.