Sample 25384: Demonstrates Basic Files Generated from ODS MARKUP using EVENT_MAP tagset
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample is from the SAS Sample Library. For additional information refer to "SAS Output Delivery System: User's Guide".
/****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: ODSMRK4 */
/* TITLE: Demonstrates Basic Files Generated from ODS MARKUP */
/* using EVENT_MAP tagset */
/* PRODUCT: BASE */
/* SYSTEM: ALL */
/* KEYS: ODS MARKUP EVENT_MAP */
/* PROCS: PRINT GLM */
/* DATA: */
/* */
/* SUPPORT: UPDATE: */
/* REF: */
/* MISC: */
/* */
/****************************************************************/
options center;
/* Close the listing output. */
ods listing close;
/* Use the EVENT_MAP tagset to create an xml file that */
/* shows which events are triggered. */
/* You can specify the tagset a number of ways. */
/* Here we specify ods markup with the tagset option. */
/* Make sure you close the destination the same way you */
/* opened it. */
ods markup tagset=event_map body='odsmrk4a.xml';
ods markup tagset=event_map close;
/* Specify as tagsets.<tagset_name> */
/* Close it the same way. */
ods tagsets.event_map body='odsmrk4a.xml';
ods tagsets.event_map close;
/* With EVENT_MAP, you can create a body file. */
/* We will create this file. */
ods markup tagset=event_map body='odsmrk4a.xml';
proc format;
value regfmt 1='East' 2='West' 3='North' 4='South';
value habfmt 1='Urban' 2='Rural' 3='Burbs';
value sexfmt 1='Female' 2='Male';
run;
data one;
retain seed1 543 seed2 1234;
length region habitat sex x w1 y w2 8;
drop ind j;
do region = 1 to 4;
if region eq 2 or region eq 4 then
do habitat = 1 to 2;
do sex = 1 to 2;
call ranuni( seed1, ind );
ind = int( ind * 3 ) + 2;
if region=4 and sex=2 then ind=0;
do j= 1 to ind;
call rannor( seed2, y );
y = int( y * 3 + 13 );
x = 5 * y;
w1 = j;
w2 = 1+mod(j,2);
output;
end;
end;
end;
else
do habitat = 1 to 3;
do sex = 1 to 2;
call ranuni( seed1, ind );
ind = int( ind * 2 ) + 2;
do j= 1 to ind;
call rannor( seed2, y );
y = int( y * 3 + 13 );
x = 5 * y;
w1 = habitat;
w2 = sex;
output;
end;
end;
end;
end;
drop seed1 seed2;
format region regfmt. sex sexfmt. habitat habfmt.;
return;
run;
title2 'Proc print output to EVENT_MAP';
proc print data=one;
where region in (2,4);
format sex 4. region 4.;
run;
data plants;
input type $ @;
do block=1 to 3;
input stemleng @;
output;
end;
cards;
clarion 32.7 32.3 31.5
clinton 32.1 29.7 29.1
knox 35.7 35.9 33.1
o'neill 36.0 34.2 31.2
compost 31.8 28.0 29.2
wabash 38.2 37.8 31.9
webster 32.5 31.1 29.7
;
run;
title2 'Proc GLM output to EVENT_MAP';
proc glm data = plants;
class type block;
model stemleng=type block;
run;
quit;
/* Then close the EVENT_MAP destination the same way it */
/* was opened. */
ods markup tagset=event_map close;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This code produces an XML file.
Click here to see the code
Results for this sample were generated in SAS Release 9.1.3 Service Pack 2.
Basic Files Generated from ODS MARKUP using EVENT_MAP tagset
| Type: | Sample |
| Topic: | Third Party ==> Output ==> XML SAS Reference ==> ODS (Output Delivery System)
|
| Date Modified: | 2005-08-19 10:08:20 |
| Date Created: | 2005-05-23 13:50:11 |
Operating System and Release Information
| SAS System | Base SAS | All | 9.1 TS1M0 | n/a |