Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Interactive Control Charts

Associating URLs with Subgroups in HTML

You can use the Output Delivery System (ODS) to produce an HTML file containing a control chart created by the SHEWHART procedure. The HTML= option provides a way to associate Uniform Resource Locators (URLs) with subgroups plotted on a control chart. It specifies a variable in the input data set whose values provide the URLs to be associated with different subgroups. The HTML= variable can be a character variable or a numeric variable with an associated character format.

The following statements generate an \bar{X} chart that is saved to a GIF file and included in an HTML file. The formatted values of the numeric HTML= variable WEB are URLs that link subgroups in the input data set to various web pages.

   goptions target = gif;
   ods html body = "example1.html";

   proc format;
      value webfmt
      1='HREF="http://www.sas.com/"'
      2='HREF="http://www.sas.com/service/techsup/faq/qc/shewproc.html"'
      3='HREF="http://www.sas.com/rnd/app/qc.html"'
      4='HREF="http://www.sas.com/rnd/app/qc/qcnew.html"'
      5='HREF="http://www.sas.com/software/web_enablement/"'
      ;

   data wafers;
      format web webfmt.;
      input batch web @;
      do i=1 to 5;
         input diamtr @;
         output;
         end;
      drop i;
   datalines;
    1  1  35.00 34.99 34.99 34.98 35.00
    2  1  35.00 34.99 34.99 34.98 35.00
    3  1  34.99 34.99 35.00 34.99 35.00
    4  1  35.00 35.00 34.99 34.99 35.00
    5  2  35.00 34.99 34.98 34.99 35.00
    6  2  34.99 34.99 35.00 35.00 35.00
    7  2  35.01 34.98 35.00 35.00 34.99
    8  2  35.00 35.00 34.99 34.98 34.99
    9  3  34.99 34.98 34.99 35.01 35.00
   10  3  34.99 35.00 35.00 34.99 35.00
   11  3  35.01 35.00 35.00 34.98 34.99
   12  3  34.99 34.99 35.00 34.98 35.01
   13  4  35.01 34.99 34.98 34.99 34.99
   14  4  35.00 35.00 34.99 35.00 34.99
   15  4  34.98 35.00 34.99 35.00 34.99
   16  4  34.99 35.00 35.00 35.01 35.00
   17  5  34.98 34.98 34.98 34.99 34.98
   18  5  35.01 35.02 35.00 34.98 35.00
   19  5  34.99 34.98 35.00 34.99 34.98
   20  5  34.99 35.00 35.00 34.99 34.99
   ;

   symbol1 v=square;
   proc shewhart data=wafers;
      xchart diamtr*batch / html = ( web );
   run;

   ods html close;
   run;
In this example five different URLs are each associated with a set of four subgroup values. When you view the ODS HTML output with a browser, you can click on a subgroup data point and the browser will bring up the page specified by the subgroup's URL. These URLs happen to point to pages at SAS Institute's web site which may be of interest to SAS/QC users.

Note: The value of the HTML= variable must be the same for each observation belonging to a given subgroup.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.