<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Proc Report and Format with Overlapping Ranges in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-and-Format-with-Overlapping-Ranges/m-p/46993#M12563</link>
    <description>Hi:&lt;BR /&gt;
  You are correct that only PROC TABULATE and MEANS/SUMMARY will use multi-label formats. (The doc:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#/documentation/cdl/en/proc/61895/HTML/default/a002473472.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#/documentation/cdl/en/proc/61895/HTML/default/a002473472.htm&lt;/A&gt; )&lt;BR /&gt;
&lt;BR /&gt;
So, you just can't use MLF with PROC REPORT directly, but what a lot of folks do is either manipulate the data before PROC REPORT to add extra observations for counting or reporting (not my first choice) or create an output dataset with either MEANS or TABULATE and then use that summary dataset in PROC REPORT.  &lt;BR /&gt;
&lt;BR /&gt;
See the example below where I create the WORK.MLFOUT dataset from PROC TABULATE and then use that dataset with PROC REPORT.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc format;&lt;BR /&gt;
  value drv (multilabel)&lt;BR /&gt;
  15-16='driver'&lt;BR /&gt;
  11-14= 'non-driver'&lt;BR /&gt;
  11-12 ='preteen'&lt;BR /&gt;
  13-19 = 'teen';&lt;BR /&gt;
run;&lt;BR /&gt;
                        &lt;BR /&gt;
ods listing close;&lt;BR /&gt;
ods html file='c:\temp\usemlf.html' style=sasweb;&lt;BR /&gt;
proc tabulate data=sashelp.class out=work.mlfout(rename=(n=count));&lt;BR /&gt;
  title 'TABULATE creates output dataset';&lt;BR /&gt;
  class age / mlf;&lt;BR /&gt;
  class sex;&lt;BR /&gt;
  format age drv.;&lt;BR /&gt;
  table sex,&lt;BR /&gt;
        age;&lt;BR /&gt;
run;&lt;BR /&gt;
                      &lt;BR /&gt;
proc report data=mlfout nowd;&lt;BR /&gt;
  title 'REPORT uses output dataset from TABULATE with MLF';&lt;BR /&gt;
  column sex count,age;&lt;BR /&gt;
  define sex / group;&lt;BR /&gt;
  define age /across;&lt;BR /&gt;
  define count / ' ';&lt;BR /&gt;
run;&lt;BR /&gt;
          &lt;BR /&gt;
ods html close;&lt;BR /&gt;
[/pre]</description>
    <pubDate>Sat, 10 Jul 2010 15:04:16 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2010-07-10T15:04:16Z</dc:date>
    <item>
      <title>Proc Report and Format with Overlapping Ranges</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-and-Format-with-Overlapping-Ranges/m-p/46992#M12562</link>
      <description>From what I knew, to create a self-defined format with overlapping ranges (multilabel formats), we can use the MULTILABEL option in the VALUE statement in PROC FORMAT.&lt;BR /&gt;
&lt;BR /&gt;
However, the multilabel formats can only apply on the three procedures namely PRCO TABULATE, PROC MEANS and PROC SUMMARY (NOT INCLUDE PROC REPORT).&lt;BR /&gt;
&lt;BR /&gt;
I was wondering whether there are some ways or options that the multilabel formats can be applied in PROC REPORT.&lt;BR /&gt;
&lt;BR /&gt;
Any advice you can give would be appreciated!</description>
      <pubDate>Sat, 10 Jul 2010 14:26:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-and-Format-with-Overlapping-Ranges/m-p/46992#M12562</guid>
      <dc:creator>BNG</dc:creator>
      <dc:date>2010-07-10T14:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report and Format with Overlapping Ranges</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-and-Format-with-Overlapping-Ranges/m-p/46993#M12563</link>
      <description>Hi:&lt;BR /&gt;
  You are correct that only PROC TABULATE and MEANS/SUMMARY will use multi-label formats. (The doc:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#/documentation/cdl/en/proc/61895/HTML/default/a002473472.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#/documentation/cdl/en/proc/61895/HTML/default/a002473472.htm&lt;/A&gt; )&lt;BR /&gt;
&lt;BR /&gt;
So, you just can't use MLF with PROC REPORT directly, but what a lot of folks do is either manipulate the data before PROC REPORT to add extra observations for counting or reporting (not my first choice) or create an output dataset with either MEANS or TABULATE and then use that summary dataset in PROC REPORT.  &lt;BR /&gt;
&lt;BR /&gt;
See the example below where I create the WORK.MLFOUT dataset from PROC TABULATE and then use that dataset with PROC REPORT.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc format;&lt;BR /&gt;
  value drv (multilabel)&lt;BR /&gt;
  15-16='driver'&lt;BR /&gt;
  11-14= 'non-driver'&lt;BR /&gt;
  11-12 ='preteen'&lt;BR /&gt;
  13-19 = 'teen';&lt;BR /&gt;
run;&lt;BR /&gt;
                        &lt;BR /&gt;
ods listing close;&lt;BR /&gt;
ods html file='c:\temp\usemlf.html' style=sasweb;&lt;BR /&gt;
proc tabulate data=sashelp.class out=work.mlfout(rename=(n=count));&lt;BR /&gt;
  title 'TABULATE creates output dataset';&lt;BR /&gt;
  class age / mlf;&lt;BR /&gt;
  class sex;&lt;BR /&gt;
  format age drv.;&lt;BR /&gt;
  table sex,&lt;BR /&gt;
        age;&lt;BR /&gt;
run;&lt;BR /&gt;
                      &lt;BR /&gt;
proc report data=mlfout nowd;&lt;BR /&gt;
  title 'REPORT uses output dataset from TABULATE with MLF';&lt;BR /&gt;
  column sex count,age;&lt;BR /&gt;
  define sex / group;&lt;BR /&gt;
  define age /across;&lt;BR /&gt;
  define count / ' ';&lt;BR /&gt;
run;&lt;BR /&gt;
          &lt;BR /&gt;
ods html close;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Sat, 10 Jul 2010 15:04:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-and-Format-with-Overlapping-Ranges/m-p/46993#M12563</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-07-10T15:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report and Format with Overlapping Ranges</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-and-Format-with-Overlapping-Ranges/m-p/46994#M12564</link>
      <description>Thanks Cynthia, your suggestion is very useful!</description>
      <pubDate>Sat, 10 Jul 2010 15:25:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-and-Format-with-Overlapping-Ranges/m-p/46994#M12564</guid>
      <dc:creator>BNG</dc:creator>
      <dc:date>2010-07-10T15:25:42Z</dc:date>
    </item>
  </channel>
</rss>

