The SAS Output Delivery System and reporting techniques

How to get list of used events (TAGSETS)

Accepted Solution Solved
Reply
Contributor
Posts: 59
Accepted Solution

How to get list of used events (TAGSETS)

Hello,

 

I have a problem with writing a new tagset. It is extremely hard to follow how different procedures/statements trigger events.

Is there any way to get a list of the triggered events after specific procedure is run?

For example I would need to find which event is linked to ODS TEXT statement.

Thank you!


Accepted Solutions
Solution
‎03-21-2017 02:51 AM
SAS Super FREQ
Posts: 8,643

Re: How to get list of used events (TAGSETS)

[ Edited ]

Hi, in fact, there is a way to see which events are triggered by which procedures, if you are writing your own tagset template. This rather old paper https://support.sas.com/resources/papers/proceedings09/227-2009.pdf outlines the major difference between the various template types and talks about how you can use the EVENT_MAP tagset to create output that shows exactly which events are triggered by which procedure.

 

  But you REALLY, REALLY, REALLY have to need to write your own TAGSET template. To change the style of ODS TEXT, though, would be a style template change, not a TAGSET template change. So I am sort of confused why you are asking about ODS TEXT and how to trace events. Do you want to trace the events or do you need to change the style?

 

cynthia

View solution in original post


All Replies
Grand Advisor
Posts: 16,316

Re: How to get list of used events (TAGSETS)

Not sure if there's an automated way but for ODS TEXT it's the UserText event. 

See docs, under Details section. 

 

http://support.sas.com/documentation/cdl/en/odsug/69832/HTML/default/viewer.htm#p14gx25pepks6dn1q9m7...

Contributor
Posts: 59

Re: How to get list of used events (TAGSETS)

Thank you Reeza, this documentation certainly will help me. However I would need to control several different PROC output and I am looking for a method similar to ods trace but for the events. But maybe there is no such thing.

Grand Advisor
Posts: 9,713

Re: How to get list of used events (TAGSETS)

If you are looking to control appearance of output for specific procedures then perhaps what you want to do is to modify the templates used by the reports and do not need a tagset.

 

 

Solution
‎03-21-2017 02:51 AM
SAS Super FREQ
Posts: 8,643

Re: How to get list of used events (TAGSETS)

[ Edited ]

Hi, in fact, there is a way to see which events are triggered by which procedures, if you are writing your own tagset template. This rather old paper https://support.sas.com/resources/papers/proceedings09/227-2009.pdf outlines the major difference between the various template types and talks about how you can use the EVENT_MAP tagset to create output that shows exactly which events are triggered by which procedure.

 

  But you REALLY, REALLY, REALLY have to need to write your own TAGSET template. To change the style of ODS TEXT, though, would be a style template change, not a TAGSET template change. So I am sort of confused why you are asking about ODS TEXT and how to trace events. Do you want to trace the events or do you need to change the style?

 

cynthia

Contributor
Posts: 59

Re: How to get list of used events (TAGSETS)

Yes I think I really have to do my own tagset. I am writing a customized HTML tagset and for example for the ODS TEXT I would like to give some base properties written in HTML. I use html4 as a parent. Thank you all for the answers, I guess I can now proceed with my code Smiley Happy

SAS Super FREQ
Posts: 8,643

Re: How to get list of used events (TAGSETS)

Hi, here are 2 screen shots of using the event_map tagset to help you figure out what's been triggered. Hope this helps you get started.

cynthia

 

with ODS TEXT

event_map_text.png

 

for the Row headers in PROC FREQ

event_map_output.png

SAS Super FREQ
Posts: 8,643

Re: How to get list of used events (TAGSETS)

Hi:

  An addendum:

  If all I needed to do was change something about ODS TEXT output that was written, I would be tempted to alter the HTML with a program. For example, I can do this:

use_data_step.png

 

In the original runfreq.html file, the line written by ODS TEXT is: "This is ODS TEXT" - if I want to change the HTML written for just that line, the HTML elements that are written are:

<table width="100%" style=" border: 0px solid #000000; border-spacing: 0px;" cellspacing="0" cellpadding="0" rules="none" frame="void">
<tr>
<td class="l usertext">This is ODS TEXT</td>
</tr>
</table>

And in particular, the one line with the ODS TEXT string is <td class="l usertext">This is ODS TEXT</td> -- which can be read with a DATA step program and altered, possibly easier than writing your own TAGSET template (which you will then have to get put into a production library and remember to use everytime you want the custom ODS TEXT written).

 

My program created the changed HTML file called change_new.html by this program -- I just write out most of the original file unchanged, until I run into the line with "l usertext" and then I change it by inserting my own HTML and even some extra text. Here's that program.

 

cynthia

post_process.png

Contributor
Posts: 59

Re: How to get list of used events (TAGSETS)

Thank you very much Cynthia! Really useful and clear presentation. I will dig in to these and see what suits the best for me.

Post a Question
Discussion Stats
  • 8 replies
  • 171 views
  • 1 like
  • 4 in conversation