BookmarkSubscribeRSS Feed
metalray
Calcite | Level 5
Hello,

we have a stored process that is part of an information map.
the stp just fetches and cleans some OLAP data while the info map
provides the prompts and clean data presentation. now we
have the info map in the web report as a source and we place
an additional stp on the web report which should get the values from
the prompts as global macro variables to be used on other reports as well (other stps).

our issue is:
how to access the values from the prompts?

we cant use the following:
http://support.sas.com/kb/40/758.html
-because prompt values are defined in the info map, if defined in STP the
prompts are displayed before the data is ready and they dont work

regards,
bob
4 REPLIES 4
metalray
Calcite | Level 5
Just to clarify. I am looking for the SAS Base code that I can use in my STP to access the variables.

when we do a proc print statement in an stp that should simply print the marco variable that has been created through the user prompt selection and insert that STP in the web report we did not see a result.
metalray
Calcite | Level 5
Hello,

we have three prompts that are defined within an STP that is then inserted on
a web report. The hope is that those three prompts (their source is an InfoMap)
will create three macro variables that share the same name as the prompts themselves.

We read a tutorial that mentioned that Prompt and their values will be available as global macro
variables automatically but this is not what we observed hence,
on the same web report is a second STP that makes those macro variables global macro variables:

--STP 2--
%global year quarter month indicator scenario wertetyp;

A third STP on the very same report is then trying to use those macro variables (global or not)
but we have no success. The STP (3) does not display anything.

proc sql;
create view work.DrillThrough as
select a.team, b.*
from new a join v_fakt b on a.wer_id=b.werr_id
where jahr="&year" and quartal="&quarter" and monat="&month";
quit;

As a temporary solution we write the values to a data set and read it out of there
but the solution does not scale up well for hundreds of users.

Any ideas?
AngelaHall
SAS Employee
Here is a SAS Sample on how to utilize prompts within all sections of your Web Report Studio Report:

http://support.sas.com/kb/40/758.html


~ Angela
metalray
Calcite | Level 5
Hi Angela,

I just learned that Global macro variables are so named because they have global scope
within a single SAS process (as compared with local macro variables
scoped within individual macros in the same process). Unfortunately
they are not global across SAS processes which is why we multiple stored process
are not able to "communicate" to each other.

What we are doing now, is passing values between the stored process
by using shared data sets and that seems to be the only solution.

Regards,
Bob

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1152 views
  • 0 likes
  • 2 in conversation