Published on :

ODS Event Map Generation

This code is also available in: Deutsch Español Français
This script activates the 'event_map' tagset of the ODS (Output Delivery System) to capture the hierarchical structure of events generated during the execution of a PROC PRINT. The result is saved in a 'test.xml' file. This technique is useful for debugging or creating custom tagsets. The script then attempts to open this file via the DM (Display Manager) command, which is primarily functional in classic interactive environments (PC SAS© or Enterprise Guide), but its behavior may vary under SAS© Viya/Studio.
Data Analysis

Type : SASHELP


Uses the standard sashelp.class table to generate output events.

1 Code Block
ODS
Explanation :
Activates the ODS MARKUP destination with the 'event_map' tagset. Executes PROC PRINT on sashelp.class to generate the event stream, then closes all ODS destinations to finalize writing the 'test.xml' file.
Copied!
1ods markup file='test.xml' tagset=event_map ;
2PROC PRINT
3DATA=sashelp.class ;
4 
5RUN ;
6ods _all_ close ;
7 
2 Code Block
DM Command
Explanation :
Sends a command to the Display Manager to open the generated 'test.xml' file in SAS's internal web browser.
Copied!
1dm "wbrowse 'test.xml'" ;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.