Hi SAS-perts!
I have successfully created an UI using SAS Stored Processes in EG environment - Involving creating session, passing macro variables within a session, creating custom HTML forms, updating the form with user inputs, drill down reports-etc.
Thanks for the inputs from the SAS community as and when required. (Thanks to FriedEgg, Filipvdr, milts, ballardw, NN, Juan Luis Sánchez Hernández.. Sorry If I missed anybody who helped me..Ofcourse SAS TechSupport)
My current problem is -
I have special characters in macro variable values. Initially I have suppressed '&' and apostrophe.
It is passing the 'comma' character properly. When I pass AAAA, INC - it is passing correctly.
But I realized that it is not passing the '+'. When I pass 'days +3' and it ends up showing 'days 3'.
I m not sure what other special characters it will not pass!
Eventually I dont want to suppress any of the special characters and want to display them as such.
Examples. The variable has the following values.. which is being passes as _name.
Wal&Mart
Wal-Mart
Wal'mart
Wal,Mart
Any help is appreciated!
Dear
did your read documentation about the function and call routine HTMLENCODE:
Encodes characters using HTML character entity references, and returns the encoded string.
Regards
Hi lacrefa
Thanks for your reply.
After posting this, I learnt that using URLENCODE is the one that I would need.
Thanks again!
If you are creating stored process server sessions, the other option is to take advantage of the SAVE_ convention for saving macro variables from one request to the next one. This only works if you are using sessions. Basically what the server does is at the end of the request, it saves all the macro variables whose name begin with SAVE_ (not case-sensitive) and then when a new request reconnects to the session, it loads the macro variables back so they are available. This is a nice way to save state without having to embed values in the URL as name/value pairs.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.