<?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: SAS 9.4 dblabel error in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-dblabel-error/m-p/335439#M75919</link>
    <description>&lt;P&gt;So what is your full question then? You can assign a libname using the EXCEL engine and then add the DBLABEL to a DATA statement writing to the LIBNAME.&lt;/P&gt;</description>
    <pubDate>Thu, 23 Feb 2017 22:37:44 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2017-02-23T22:37:44Z</dc:date>
    <item>
      <title>SAS 9.4 dblabel error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-dblabel-error/m-p/335377#M75895</link>
      <description>&lt;P&gt;I tried adding dblabel=yes to my code.&lt;/P&gt;&lt;P&gt;My goal is to add labels to the variable names in&amp;nbsp;&lt;SPAN&gt;EE_ActionOnly4 so that when I export this data the labels are exported as well.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;data EE_ActionOnly4(dblabel=yes);&lt;/P&gt;&lt;P&gt;set EE_ActionOnly3;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;However, I received this error:&lt;/P&gt;&lt;P&gt;ERROR 22-7: Invalid option name DBLABEL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 18:52:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-dblabel-error/m-p/335377#M75895</guid>
      <dc:creator>gzr2mz39</dc:creator>
      <dc:date>2017-02-23T18:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 dblabel error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-dblabel-error/m-p/335388#M75897</link>
      <description>&lt;P&gt;I'm pretty sure this option is only valid when your DATA step is actually writing to the database you want it applied to and not prior to that. Here is an example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/acpcref/69731/HTML/default/viewer.htm#n04dewltjfxt5un1clp39h4gqz79b.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/acpcref/69731/HTML/default/viewer.htm#n04dewltjfxt5un1clp39h4gqz79b.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 19:43:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-dblabel-error/m-p/335388#M75897</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2017-02-23T19:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 dblabel error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-dblabel-error/m-p/335393#M75899</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;If you are talking about excel

Adding name and label to column headings in excel

HAVE
====

Up to 40 obs from sashelp.iris total obs=150

Obs    SPECIES    SEPALLENGTH    SEPALWIDTH    PETALLENGTH    PETALWIDTH

  1    Setosa          50            33             14             2
  2    Setosa          46            34             14             3
  3    Setosa          46            36             10             2
  4    Setosa          51            33             17             5
  5    Setosa          55            35             13             2

             Variables in Creation Order

#    Variable       Type    Len    Label

1    SPECIES        Char     10    Iris Species
2    SEPALLENGTH    Num       8    Sepal Length (mm)
3    SEPALWIDTH     Num       8    Sepal Width (mm)
4    PETALLENGTH    Num       8    Petal Length (mm)
5    PETALWIDTH     Num       8    Petal Width (mm)

WANT in EXCEL
=============

       [SPECIES]    [SEPALLENGTH]    [SEPALWIDTH]    [PETALLENGTH]    [PETALWIDTH]
         Iris        Sepal Length     Sepal Width     Petal Length     Petal Width
Obs     Species          (mm)            (mm)             (mm)            (mm)

123    Virginica          61              30               49              18
124    Virginica          61              26               56              14
125    Virginica          64              28               56              21
126    Virginica          62              28               48              18
127    Virginica          77              30               61              23


WORKING CODE
============

 SQL
    proc sql;
      select
        catx(' ',cats(name,'="[',name,']'),label,'"')
        sashelp.vcolumn
 PRINT
    proc print data=sashelp.iris label;
    label &amp;amp;namlbl.;

FULL SOLUTION
=============

proc sql;
  select
    catx(' ',cats(name,'="[',name,']'),label,'"')
  into
    :namlbl separated by ' '
  from
    sashelp.vcolumn
  where
         libname='SASHELP'
    and  memname='IRIS'
;quit;

ods excel file="d:/xls/namlbl.xlsx";
proc print data=sashelp.iris label;
label &amp;amp;namlbl.;
run;quit;
ods excel close;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Feb 2017 20:18:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-dblabel-error/m-p/335393#M75899</guid>
      <dc:creator>rogerjdeangelis</dc:creator>
      <dc:date>2017-02-23T20:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 dblabel error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-dblabel-error/m-p/335403#M75903</link>
      <description>&lt;P&gt;With regards to trying to export data with its labels, I should have also added I need to use PC File Server to export the excel file.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 20:35:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-dblabel-error/m-p/335403#M75903</guid>
      <dc:creator>gzr2mz39</dc:creator>
      <dc:date>2017-02-23T20:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 dblabel error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-dblabel-error/m-p/335439#M75919</link>
      <description>&lt;P&gt;So what is your full question then? You can assign a libname using the EXCEL engine and then add the DBLABEL to a DATA statement writing to the LIBNAME.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 22:37:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-dblabel-error/m-p/335439#M75919</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2017-02-23T22:37:44Z</dc:date>
    </item>
  </channel>
</rss>

