SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Creating Drill-Down Graphs in HTML
Creating a Variable for Link Locations


To associate bars on the chart with HTML files, you start by creating a variable to hold the HREF addresses for the secondary files. You'll add the variable to the data used to create your chart. In our example, the variable is added to a temporary copy of Finance.Prdsal2.

Creating a variable

Because HREF links are long text strings, use a LENGTH statement to define the new character variable.


General form, LENGTH statement:
LENGTH variable(s) <$> length;

where

  • variable(s) names the variable to be assigned a length
  • $ indicates that the preceding variable is a character variable
  • length is an integer that specifies the length of the variable.


For this example, we will use a LENGTH statement to create a character variable (PriDrill) with a length of 40.
     data work.saletrnd;
        set finance.prdsal2;
        length PriDrill $ 40;
     run;

PriDrill will store the names of the pages to load when users click the bars of the chart.


  back||next


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

Terms of Use & Legal Information | Privacy Statement