<?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 Format Help!  (_Label_) in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Format-Help-Label/m-p/94937#M26855</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You cannot use a format in that way, but you could use it with %SYSFUNC() call.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; background-color: #ffffff;"&gt;label mtd_total = "%sysfunc(today(),fmtb.)" ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Why do you need to define your own format? Why not just build the string from the month and year?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;label mtd_total="%upcase(%sysfunc(today(),monname3.)-%sysfunc(today(),year2.))";&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 14 Oct 2012 18:13:09 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2012-10-14T18:13:09Z</dc:date>
    <item>
      <title>Proc Format Help!  (_Label_)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Format-Help-Label/m-p/94934#M26852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to use MMM-YY (Oct-12) as a column lable using proc format.&amp;nbsp; Using the code below I get&lt;/P&gt;&lt;P&gt;'format mon_yr fmtb.' as the column label.&amp;nbsp; How can I have the column lable as 'Oct-12' ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc format;&lt;/P&gt;&lt;P&gt;picture fmtb(default=6) other='%b-%y' (datatype = date);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data mtd;&lt;/P&gt;&lt;P&gt;set in1;&lt;/P&gt;&lt;P&gt;mon_yr = today();&lt;/P&gt;&lt;P&gt;format mon_yr fmtb.;&lt;/P&gt;&lt;P&gt;label mtd_total = format mon_yr fmtb.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for any input you may have! &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Oct 2012 17:04:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Format-Help-Label/m-p/94934#M26852</guid>
      <dc:creator>KevinC_</dc:creator>
      <dc:date>2012-10-14T17:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Format Help!  (_Label_)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Format-Help-Label/m-p/94935#M26853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;let me make myself a little more clear:&amp;nbsp;&amp;nbsp; I know I can have&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;label&amp;nbsp; mtd_total = 'OCT-12';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I am trying to automate this process so no manual updates..&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Oct 2012 17:09:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Format-Help-Label/m-p/94935#M26853</guid>
      <dc:creator>KevinC_</dc:creator>
      <dc:date>2012-10-14T17:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Format Help!  (_Label_)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Format-Help-Label/m-p/94936#M26854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since you are creating a copy of the file anyway, you could create that copy using call execute and include the desired label statement.&amp;nbsp; e.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc format;&lt;/P&gt;&lt;P&gt;&amp;nbsp; picture fmtb(default=6) other='%b-%y' (datatype = date);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data in1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set sashelp.class (rename=(weight=mtd_total));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; call execute('data mtd;set in1;'&lt;/P&gt;&lt;P&gt;&amp;nbsp; ||'label mtd_total ='&lt;/P&gt;&lt;P&gt;&amp;nbsp; ||put(today(),fmtb.)&lt;/P&gt;&lt;P&gt;&amp;nbsp; ||';run;');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course, if the file already exists, doing the same thing using proc datasets would be more economical.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Oct 2012 17:41:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Format-Help-Label/m-p/94936#M26854</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-10-14T17:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Format Help!  (_Label_)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Format-Help-Label/m-p/94937#M26855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You cannot use a format in that way, but you could use it with %SYSFUNC() call.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; background-color: #ffffff;"&gt;label mtd_total = "%sysfunc(today(),fmtb.)" ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Why do you need to define your own format? Why not just build the string from the month and year?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;label mtd_total="%upcase(%sysfunc(today(),monname3.)-%sysfunc(today(),year2.))";&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Oct 2012 18:13:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Format-Help-Label/m-p/94937#M26855</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-10-14T18:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Format Help!  (_Label_)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Format-Help-Label/m-p/94938#M26856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Tom and Arthur!&lt;/P&gt;&lt;P&gt;Both of your codes worked beautifully!!&amp;nbsp; Thank you so much for your help.&amp;nbsp; I really appreciate it !!! &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom,&lt;/P&gt;&lt;P&gt;Your code always seems so slick and simple.&amp;nbsp; Your input is always greatly appreciated !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Oct 2012 18:51:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Format-Help-Label/m-p/94938#M26856</guid>
      <dc:creator>KevinC_</dc:creator>
      <dc:date>2012-10-14T18:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Format Help!  (_Label_)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Format-Help-Label/m-p/94939#M26857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="ExternalClass8ABA3F1B7E804F47B9A274840D1AFE1D"&gt;&lt;SPAN style="text-decoration: line-through;"&gt;The key to writing clear maintainable code is to Simplify, Simplify, Simplify&lt;/SPAN&gt;. &lt;BR /&gt;&lt;SPAN style="text-decoration: line-through;"&gt;The key to writing clear maintainable code is to Simplify, Simplify&lt;/SPAN&gt;. &lt;BR /&gt;The key to writing clear maintainable code is to Simplify. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Oct 2012 20:02:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Format-Help-Label/m-p/94939#M26857</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-10-14T20:02:52Z</dc:date>
    </item>
  </channel>
</rss>

