<?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 Question in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Question/m-p/135736#M261032</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Generally if you do not use an OTHER assignment then the original value will be displayed. If numeric that may be in a BEST type format. I think if your format is character and you assign a default length shorter than "other" values they could be truncated to the length of the setting in the format.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Oct 2014 19:28:25 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2014-10-21T19:28:25Z</dc:date>
    <item>
      <title>PROC FORMAT Question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Question/m-p/135735#M261031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have used proc format in the past and have a wired question...&lt;/P&gt;&lt;P&gt;I want to know what happens if I don't put the other in the proc format?????&lt;/P&gt;&lt;P&gt;as u can see I used "other" in $origin and not in the $origin...............and I am using those two formats on the same variable&lt;/P&gt;&lt;P&gt;automatically doesn't it get set to missing? do we have to use OTHER????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;value $orign&lt;/P&gt;&lt;P&gt;/*'EO','RA','1'='1'*/&lt;/P&gt;&lt;P&gt;/*'OP','OS','2'='2'*/&lt;/P&gt;&lt;P&gt;'TH','4'='4'&lt;/P&gt;&lt;P&gt;/*'NB','NP','NS',*/'TE','TI',/*'25',*/'5','24'='5'&lt;/P&gt;&lt;P&gt;/*'NE',*/'RB','TB','TF','TP','TR','TS','TT','TU','TV','TW','6','18'/*,'26'*/='6'&lt;/P&gt;&lt;P&gt;other=" "&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;value $orignB&lt;/P&gt;&lt;P&gt;'25', 'NS', 'NP', 'NB'='5'&lt;/P&gt;&lt;P&gt;'NE', '26'='6'&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NB04=put(Code,$orign.);&lt;/P&gt;&lt;P&gt;if TYPE=4 then NB04=put(Code,$orignB.);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 18:24:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Question/m-p/135735#M261031</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2014-10-21T18:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FORMAT Question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Question/m-p/135736#M261032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Generally if you do not use an OTHER assignment then the original value will be displayed. If numeric that may be in a BEST type format. I think if your format is character and you assign a default length shorter than "other" values they could be truncated to the length of the setting in the format.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 19:28:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Question/m-p/135736#M261032</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-10-21T19:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FORMAT Question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Question/m-p/135737#M261033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ballard,&lt;/P&gt;&lt;P&gt;Thanks for the reply&lt;/P&gt;&lt;P&gt;If I have properly understood you then:&lt;/P&gt;&lt;P&gt;In my example above" if I did not use "Other "u meant : what ever is the CODE value will be put into NB04.....even if I didn't say so????????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CODE&lt;/P&gt;&lt;P&gt;24&lt;/P&gt;&lt;P&gt;25&lt;/P&gt;&lt;P&gt;26&lt;/P&gt;&lt;P&gt;27&lt;/P&gt;&lt;P&gt;28&lt;/P&gt;&lt;P&gt;29&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;value $orign&lt;/P&gt;&lt;P&gt;'24', '25','26'='4'&lt;/P&gt;&lt;P&gt;'27'='5'&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NB04=put(Code,$orign.);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NB04 has a value of 28 and 29 where CODE is 28 and 29?????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 13:44:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Question/m-p/135737#M261033</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2014-10-22T13:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FORMAT Question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Question/m-p/135738#M261034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As long as you use a format of $orign2.&amp;nbsp; Otherwise I think they will appear as 2 and 2 rather than 28 and 29.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 14:25:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Question/m-p/135738#M261034</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-10-22T14:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FORMAT Question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Question/m-p/135739#M261035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Art,&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;I did not clearly understand. Could you show an example so that I would better understand???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 14:30:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Question/m-p/135739#M261035</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2014-10-22T14:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FORMAT Question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Question/m-p/135740#M261036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt; value $orign&lt;/P&gt;&lt;P&gt;'24', '25','26'='4'&lt;/P&gt;&lt;P&gt;'27'='5'&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input CODE $;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format code $orign2.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;24&lt;/P&gt;&lt;P&gt;25&lt;/P&gt;&lt;P&gt;26&lt;/P&gt;&lt;P&gt;27&lt;/P&gt;&lt;P&gt;28&lt;/P&gt;&lt;P&gt;29&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 14:32:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Question/m-p/135740#M261036</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-10-22T14:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FORMAT Question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Question/m-p/135741#M261037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was thinking so far&amp;nbsp; if I am creating a new variable(UBO4) like shown below and then put the resultant in that variable after applying the format........&lt;/P&gt;&lt;P&gt;28 and 29 would not come there into the UBO4 column.....even if you give a length of how much ever to the format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I was thinking there would be a blank in UBO4 column corresponding to the 28 and 29 in the ID column!!!!!!!!since we did not assign anything to it........it seems clearly that is bringing the ID values (original values) for which ever format doesn't get applied????&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But it seems clearly that it is wrong!!!!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;value $orign&lt;/P&gt;&lt;P&gt;'24', '25','26'='AA'&lt;/P&gt;&lt;P&gt;'27'='BB'&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input CODE $;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;24&lt;/P&gt;&lt;P&gt;25&lt;/P&gt;&lt;P&gt;26&lt;/P&gt;&lt;P&gt;27&lt;/P&gt;&lt;P&gt;28&lt;/P&gt;&lt;P&gt;29&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;set have;&lt;BR /&gt;&lt;STRONG style="text-decoration: underline;"&gt;UBO4=put(Code,$orign.);&lt;/STRONG&gt;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 20:13:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Question/m-p/135741#M261037</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2014-10-22T20:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FORMAT Question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Question/m-p/135742#M261038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's exactly the behavior I mentioned earlier: if you don't have an "other" then the original value is the result of the format. If you want a blank then use an other= ' ' statement in your format.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 20:22:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Question/m-p/135742#M261038</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-10-22T20:22:29Z</dc:date>
    </item>
  </channel>
</rss>

