Sample 25387: Demonstrates Basic Files Generated from ODS MARKUP using PHTML 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: ODSMRK7 */
/* TITLE: Demonstrates Basic Files Generated from ODS MARKUP */
/* using PHTML tagset */
/* PRODUCT: BASE */
/* SYSTEM: ALL */
/* KEYS: ODS MARKUP PHTML */
/* PROCS: PRINT GLM */
/* DATA: */
/* */
/* SUPPORT: UPDATE: */
/* REF: */
/* MISC: */
/* */
/****************************************************************/
options center;
/* Close the listing output. */
ods listing close;
/* Use the PHTML tagset to create plain HTML output. */
/* 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=phtml body='odsmrk7a.htm';
ods markup tagset=phtml close;
/* Specify as tagsets.<tagset_name> */
/* Close it the same way. */
ods tagsets.phtml body='odsmrk7a.htm';
ods tagsets.phtml close;
/* Or simply specify just the tagset name. */
/* Close it the same way. */
ods phtml body='odsmrk7a.htm';
ods phtml close;
/* With PHTML, you can create a body, contents, page, */
/* frame and stylesheet files. */
/* We will create the body file. */
ods phtml body='odsmrk7a.htm';
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 PHTML';
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 PHTML';
proc glm data = plants;
class type block;
model stemleng=type block;
run;
quit;
/* Then close the PHTML destination the same way it was */
/* opened. */
ods phtml 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.
Demonstrates Basic Files Generated from ODS MARKUP using PHTML tagset
| Type: | Sample |
| Topic: | Third Party ==> Output ==> HTML SAS Reference ==> ODS (Output Delivery System)
|
| Date Modified: | 2005-08-31 03:03:25 |
| Date Created: | 2005-05-23 13:50:22 |
Operating System and Release Information
| SAS System | Base SAS | All | 8.2 TS2M0 | n/a |