09-12-2012 05:12 PM
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.
Any help is appreciated!
09-15-2012 12:46 AM
did your read documentation about the function and call routine HTMLENCODE:
Encodes characters using HTML character entity references, and returns the encoded string.
09-17-2012 10:22 AM
Thanks for your reply.
After posting this, I learnt that using URLENCODE is the one that I would need.
09-27-2012 06:41 PM
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.