Your SAS programs, embedded in web apps and elsewhere

pass parameter to _METAUSER

Reply
Regular Contributor
Posts: 163

pass parameter to _METAUSER

I have a code that calls upon itself but I would like to pass a user logon into _METAUSER. I tried using this in the link when calling the stp:

HREF="http:///BIP TREE/ETC../
&_METAUSER='||urlencode(strip(logon_Person))|| <---is this correct?
SAS Employee
Posts: 285

Re: pass parameter to _METAUSER

Can you provide more information?

What are you trying to achieve? Drill-down to another stored process?
What application are you using to execute the stored process?
What version of SAS are you using?

Vince DelGobbo
SAS R&D
Regular Contributor
Posts: 163

Re: pass parameter to _METAUSER

Vince,
yes , drill down to another STP but to the same one that is making the call wheb the user clicks on a link. I am using the STP web Application with SAS 9.1.3.
I have something wthat works fine but I originally wanted to do it using _METAUSER and assign it a value to be passed via the link.
SAS Employee
Posts: 285

Re: pass parameter to _METAUSER

It's generally not a good idea to modify variables that SAS defines. I suggest that you use something other than _METAUSER.


Here is some sample code for you to try:


[pre]
%let URL=&_URL.?_program=&_PROGRAM%nrstr(&MYUSER=someValue);

data _null_;
file _webout;
put '<a href="' "&URL" '">Text for Hyperlink</a>';
run;
[/pre]


Vince DelGobbo

SAS R&D

Regular Contributor
Posts: 163

Re: pass parameter to _METAUSER

Vince,
Thanks! That recommendation is as good as gold to me.

Ok. I'll just have what I got or like what you recommended.

jp
Ask a Question
Discussion stats
  • 4 replies
  • 237 views
  • 0 likes
  • 2 in conversation