I have a problem with the predefined macros. I create a stored process that contain predefined macros (_USERNAME). I want to get username from the user. Here is my code :
%global _USERNAME usernames;
libname test "*(libref location)";
%stpbegin;
DATA test.UsernameData;
username="&_USERNAME";
RUN;
DATA _NULL_;
SET test.UsernameData;
call symput("usernames",username);
RUN;
%stpend;
When I access it by using SASStoredProcess/do , the stored process is working. Then I try to make a report by using web report studio. First, I create information map and import the stored process to it. Then I create new data item, that will stored the usernames from test.UsernameData.
I create new web report studio and using the information that I just created. I try to show whether web report studio show the its username or not like in SASStoredProcess/do. The result is empty string.
Is it the macros is not working in web report studio?
Hopefully, anyone could help me to solve the problem. Thank You.
Hi,
Sorry i donot have an answer specific to ur question. nor can i test in web report...... but in our framework i usually use the _metauser macro...
will that help?
Secondly i feel you are trying to view the hits on your reports .. you should have a look at this sasnote http://support.sas.com/kb/39/510.html
Hi,
Sorry i donot have an answer specific to ur question. nor can i test in web report...... but in our framework i usually use the _metauser macro...
will that help?
Secondly i feel you are trying to view the hits on your reports .. you should have a look at this sasnote http://support.sas.com/kb/39/510.html
Hi, thanks for reply,,
I have tried and it is worked. I chane the _username macro into _metauser macro. Thank You.
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
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.