SAS OnlineTutorback||next

Try It! Using the Clinic.Admit data set, create a drill-down chart and linked output.

Creating HTML output? Read this first.

  1. Copy the following program and paste it into the Program Editor window (or issue the command copy sashelp.oltutor..source).

data work.activity;
   set clinic.admit;
   length DrillDown $ 40;
   if sex='F' then 
      drilldown='HREF="actfem.html"';
   if sex='M' then 
      drilldown='HREF="actmale.html"';
run;

ods listing close;
ods html path='?' body='?';
goptions device=gif xpixels=440 
         ypixels=330;
title 'Participant Activity Levels';
proc gchart data=work.activity;
   hbar sex / subgroup=actlevel 
        raxis=axis1 nostats html=?;
   axis1 minor=none 
         label=('Participants');
run;

ods html ?;
title 'Age and Activity Levels for Females';
proc  ?;
   where sex='F';
run;

ods html ?;
title 'Age and Activity Levels for Males';
proc ?;
   where sex='M';
run;

quit;
ods html close;
ods listing;
If you are using SAS software in the OS/390 or CMS operating environments, you can view a sample program for platform-specific reminders.
  1. Replace the question marks (?) with code to

    • provide a valid path for GIF and HTML output. For this option, add a suboption to specify that no path information is used in the URLs for linked files.

    • name the primary HTML page active.html. In the CMS operating environment, specify active html as the HTML filename and filetype.

    • link chart elements to HREF values in the variable Drilldown.

    • specify two HTML pages for output, one where Sex=F (actfem.html) and one where Sex=M (actmale.html). In the CMS operating environment, specify actmale html and actfemale html as the HTML filenames and filetypes.

    • specify the URLs actfem.html and actmale.html for these files.

    • complete two PROC steps to generate output that is subset or categorized by values of Sex (one where Sex=F and one where Sex=M). Use a SAS procedure that you are familiar with, such MEANS, FREQ, TABULATE, UNIVARIATE, REPORT, or PRINT.

  2. Submit the program and view active.html in your browser.

  3. Click the bars of the chart to link to output where Sex=F or Sex=M.

    Return here and select Next.

Solution
back||next


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

Terms of Use & Legal Information | Privacy Statement