<?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: diplaying a variable name in the columns in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/diplaying-a-variable-name-in-the-columns/m-p/4364#M1790</link>
    <description>I think you misunderstood, I want both the variable label and the variable name as the column header.</description>
    <pubDate>Fri, 25 Apr 2008 19:51:50 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2008-04-25T19:51:50Z</dc:date>
    <item>
      <title>diplaying a variable name in the columns</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/diplaying-a-variable-name-in-the-columns/m-p/4360#M1786</link>
      <description>Is there a way to display variable name in the column, when the report is multi page and the column continues into next page. for eg. the report should display trt (type)in the listing at the begining and again when it crosses into next page.&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Tue, 28 Aug 2007 17:20:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/diplaying-a-variable-name-in-the-columns/m-p/4360#M1786</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-08-28T17:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: diplaying a variable name in the columns</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/diplaying-a-variable-name-in-the-columns/m-p/4361#M1787</link>
      <description>Hi:&lt;BR /&gt;
Based on your previous postings, I figure that your question has to do with RTF and COMPUTE BEFORE _PAGE_ in PROC REPORT and whether you can repeat the value of a group variable at a page break. With the new measured RTF, in SAS 9.2, there may be way to do what you want. Otherwise, your best bet for help with this question is to contact Tech Support.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Tue, 28 Aug 2007 19:56:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/diplaying-a-variable-name-in-the-columns/m-p/4361#M1787</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-08-28T19:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: diplaying a variable name in the columns</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/diplaying-a-variable-name-in-the-columns/m-p/4362#M1788</link>
      <description>Similar question, I would like to print the variable label with the variable name as the column header.  I work with MXG on the mainframe and there are many variables to sort through.  &lt;BR /&gt;
&lt;BR /&gt;
Thanks...</description>
      <pubDate>Fri, 25 Apr 2008 16:22:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/diplaying-a-variable-name-in-the-columns/m-p/4362#M1788</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-04-25T16:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: diplaying a variable name in the columns</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/diplaying-a-variable-name-in-the-columns/m-p/4363#M1789</link>
      <description>proc print data=indata;&lt;BR /&gt;
run;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
Will print a dataset with the column names being the variable names;&lt;BR /&gt;
&lt;BR /&gt;
If you set the pagesize option properly for the number of rows on a printed page, the headings will repeat on each page where they should be.</description>
      <pubDate>Fri, 25 Apr 2008 17:36:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/diplaying-a-variable-name-in-the-columns/m-p/4363#M1789</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-04-25T17:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: diplaying a variable name in the columns</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/diplaying-a-variable-name-in-the-columns/m-p/4364#M1790</link>
      <description>I think you misunderstood, I want both the variable label and the variable name as the column header.</description>
      <pubDate>Fri, 25 Apr 2008 19:51:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/diplaying-a-variable-name-in-the-columns/m-p/4364#M1790</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-04-25T19:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: diplaying a variable name in the columns</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/diplaying-a-variable-name-in-the-columns/m-p/4365#M1791</link>
      <description>I think you misunderstood, I want both the variable label and the variable name as the column header.  The variables in the MXG software have labels with '*' as split characters.  Some files could have over 200 variables.  When I want to pare down my report to include only the variables I want, it's a hassle going back to proc contents to get the variable name(s) and then putting together the report I want.  &lt;BR /&gt;
&lt;BR /&gt;
Thanks.</description>
      <pubDate>Fri, 25 Apr 2008 20:06:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/diplaying-a-variable-name-in-the-columns/m-p/4365#M1791</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-04-25T20:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: diplaying a variable name in the columns</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/diplaying-a-variable-name-in-the-columns/m-p/4366#M1792</link>
      <description>Hi:&lt;BR /&gt;
  There are some automatic "dictionary" tables that are created in a SAS session that may help you. As long as you have your MXG librefs defined in a session, you should be able to programmatically get a list of variable names and their labels by running a PROC SQL against DICTIONARY.COLUMNS.&lt;BR /&gt;
 &lt;BR /&gt;
  Here are some user group papers that outline what the "dictionary" tables do:&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi30/070-30.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi30/070-30.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi29/237-29.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi29/237-29.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www.codecraftersinc.com/pdf/DictionaryTablesRefCard.pdf" target="_blank"&gt;http://www.codecraftersinc.com/pdf/DictionaryTablesRefCard.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www.lexjansen.com/pharmasug/2006/tutorials/tu03.pdf" target="_blank"&gt;http://www.lexjansen.com/pharmasug/2006/tutorials/tu03.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www.qsl.net/kd6ttl/sas/sqlutilov.pdf" target="_blank"&gt;http://www.qsl.net/kd6ttl/sas/sqlutilov.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Here is an example of creating a data set from the dictionary tables...going after dictionary.columns for name and building a string that you could cut and paste into a label statement.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
** make table to use later;&lt;BR /&gt;
** cut and paste newlabel value into LABEL;&lt;BR /&gt;
** statement or for reference;&lt;BR /&gt;
proc sql;&lt;BR /&gt;
create table work.paste as&lt;BR /&gt;
select name, &lt;BR /&gt;
       trim(name)||'='||quote(trim(name)||'!'||trim(label)) as newlabel&lt;BR /&gt;
  from dictionary.columns&lt;BR /&gt;
  where libname = "SASHELP" and&lt;BR /&gt;
        memname = "PRDSALE";&lt;BR /&gt;
quit;&lt;BR /&gt;
   &lt;BR /&gt;
options nocenter;&lt;BR /&gt;
proc print data=work.paste noobs;&lt;BR /&gt;
  title 'data set from proc sql query on dictionary.columns';&lt;BR /&gt;
  title2 "for SASHELP.PRDSALE";&lt;BR /&gt;
run;&lt;BR /&gt;
title;&lt;BR /&gt;
footnote;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
The output from the PROC PRINT would be:&lt;BR /&gt;
[pre]&lt;BR /&gt;
data set from proc sql query on dictionary.columns                        &lt;BR /&gt;
for SASHELP.PRDSALE&lt;BR /&gt;
    &lt;BR /&gt;
name        newlabel&lt;BR /&gt;
     &lt;BR /&gt;
ACTUAL      ACTUAL="ACTUAL!Actual Sales"&lt;BR /&gt;
PREDICT     PREDICT="PREDICT!Predicted Sales"&lt;BR /&gt;
COUNTRY     COUNTRY="COUNTRY!Country"&lt;BR /&gt;
REGION      REGION="REGION!Region"&lt;BR /&gt;
DIVISION    DIVISION="DIVISION!Division"&lt;BR /&gt;
PRODTYPE    PRODTYPE="PRODTYPE!Product type"&lt;BR /&gt;
PRODUCT     PRODUCT="PRODUCT!Product"&lt;BR /&gt;
QUARTER     QUARTER="QUARTER!Quarter"&lt;BR /&gt;
YEAR        YEAR="YEAR!Year"&lt;BR /&gt;
MONTH       MONTH="MONTH!Month"&lt;BR /&gt;
                                &lt;BR /&gt;
[/pre]&lt;BR /&gt;
                                              &lt;BR /&gt;
In this example, I set the split character to ! so you'd put split='!' in your PROC PRINT when you cut and pasted these label strings into your code. If you wanted to keep * as the split character, then you'd replace the ! with * in the SQL query. Then your split option in PROC PRINT would be split='*'. &lt;BR /&gt;
&lt;BR /&gt;
There are many macro solutions you could build using the dictionary tables.&lt;BR /&gt;
  &lt;BR /&gt;
cynthia</description>
      <pubDate>Sat, 26 Apr 2008 02:21:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/diplaying-a-variable-name-in-the-columns/m-p/4366#M1792</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-04-26T02:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: diplaying a variable name in the columns</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/diplaying-a-variable-name-in-the-columns/m-p/4367#M1793</link>
      <description>Hi,&lt;BR /&gt;
  Use 'id' option in the define statement,so that you will get the column name in the subsequent pages also.&lt;BR /&gt;
&lt;BR /&gt;
proc report data=dsn;&lt;BR /&gt;
columns col1 col2 col3;&lt;BR /&gt;
define col1/id;&lt;BR /&gt;
run;</description>
      <pubDate>Mon, 28 Apr 2008 06:54:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/diplaying-a-variable-name-in-the-columns/m-p/4367#M1793</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-04-28T06:54:46Z</dc:date>
    </item>
  </channel>
</rss>

