<?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 in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-format/m-p/55249#M15366</link>
    <description>Hi here is information..&lt;BR /&gt;
&lt;BR /&gt;
proc format;&lt;BR /&gt;
value gov	  0 = 'Confirming'&lt;BR /&gt;
		  1='notconforming'&lt;BR /&gt;
		  ;&lt;BR /&gt;
value $age  '1'='25-49'&lt;BR /&gt;
                  '2'='50-69'&lt;BR /&gt;
                 ' 3'=' 70+'&lt;BR /&gt;
                ;&lt;BR /&gt;
data A;&lt;BR /&gt;
set B;&lt;BR /&gt;
format gover gov. age age.;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Now I am using proc export to export data set A in Excel format... I want format values in my exported excel sheet. But I got same variables values which are in data set B, how can I get this format values in my excel sheet....I will appreciate your help..</description>
    <pubDate>Fri, 22 Apr 2011 03:14:53 GMT</pubDate>
    <dc:creator>tom16</dc:creator>
    <dc:date>2011-04-22T03:14:53Z</dc:date>
    <item>
      <title>Proc format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-format/m-p/55247#M15364</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
how can I permanently change variables values by using proc format...I want to create excle file.....but when I am trying to export file with formats it agains taking original variables values rathere then formats values.....&lt;BR /&gt;
&lt;BR /&gt;
data temp.sample_final2;&lt;BR /&gt;
set sample_final;&lt;BR /&gt;
format govtn gov.  age age.;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Thanks....</description>
      <pubDate>Fri, 22 Apr 2011 01:06:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-format/m-p/55247#M15364</guid>
      <dc:creator>tom16</dc:creator>
      <dc:date>2011-04-22T01:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: Proc format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-format/m-p/55248#M15365</link>
      <description>Hi:&lt;BR /&gt;
  You don't show the formats for GOV. or AGE. formats. Without seeing how you are trying to format the numbers, it is impossible to understand what you mean when you say that Excel takes "original variable values rather than format values".&lt;BR /&gt;
&lt;BR /&gt;
  You also do not show the method by which you are getting output into Excel -- LIBNAME engine?? PROC EXPORT?? ODS CSV?? ODS HTML?? ODS TAGSETS.EXCELXP??&lt;BR /&gt;
&lt;BR /&gt;
  All of this information is essential to understanding the problem and making constructive suggestions.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Fri, 22 Apr 2011 02:05:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-format/m-p/55248#M15365</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-04-22T02:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Proc format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-format/m-p/55249#M15366</link>
      <description>Hi here is information..&lt;BR /&gt;
&lt;BR /&gt;
proc format;&lt;BR /&gt;
value gov	  0 = 'Confirming'&lt;BR /&gt;
		  1='notconforming'&lt;BR /&gt;
		  ;&lt;BR /&gt;
value $age  '1'='25-49'&lt;BR /&gt;
                  '2'='50-69'&lt;BR /&gt;
                 ' 3'=' 70+'&lt;BR /&gt;
                ;&lt;BR /&gt;
data A;&lt;BR /&gt;
set B;&lt;BR /&gt;
format gover gov. age age.;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Now I am using proc export to export data set A in Excel format... I want format values in my exported excel sheet. But I got same variables values which are in data set B, how can I get this format values in my excel sheet....I will appreciate your help..</description>
      <pubDate>Fri, 22 Apr 2011 03:14:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-format/m-p/55249#M15366</guid>
      <dc:creator>tom16</dc:creator>
      <dc:date>2011-04-22T03:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: Proc format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-format/m-p/55250#M15367</link>
      <description>Check your log, you should be getting an error, because the age format is a character format and needs to be applied as $age. &lt;BR /&gt;
&lt;BR /&gt;
try using ods html output as follows and see if it works..&lt;BR /&gt;
&lt;BR /&gt;
ods html file='c:/test.xls';&lt;BR /&gt;
&lt;BR /&gt;
proc print data=a label;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
ods html close;</description>
      <pubDate>Fri, 22 Apr 2011 04:24:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-format/m-p/55250#M15367</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2011-04-22T04:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: Proc format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-format/m-p/55251#M15368</link>
      <description>How about;&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc format;&lt;BR /&gt;
value gov 0 = 'Confirming'&lt;BR /&gt;
1='notconforming'&lt;BR /&gt;
;&lt;BR /&gt;
value $age '1'='25-49'&lt;BR /&gt;
'2'='50-69'&lt;BR /&gt;
' 3'=' 70+'&lt;BR /&gt;
;&lt;BR /&gt;
data A;&lt;BR /&gt;
set B;&lt;BR /&gt;
want_gover=put(gov,gov.);&lt;BR /&gt;
want_age=put(age,$age.);&lt;BR /&gt;
&lt;BR /&gt;
run;</description>
      <pubDate>Fri, 22 Apr 2011 05:48:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-format/m-p/55251#M15368</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-04-22T05:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: Proc format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-format/m-p/55252#M15369</link>
      <description>Thank you very much for your reply again....it works very nicelly....</description>
      <pubDate>Fri, 22 Apr 2011 14:49:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-format/m-p/55252#M15369</guid>
      <dc:creator>tom16</dc:creator>
      <dc:date>2011-04-22T14:49:14Z</dc:date>
    </item>
  </channel>
</rss>

