<?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 Format in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/202190#M50468</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a field Header1 ($20) of the form:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="224" style="border: 1px solid rgb(0, 0, 0); width: 171px; height: 180px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Header 1&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;485&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;AB27834&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;134&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A/DD123&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;678423167&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;AB1266&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and where the cell is a string where the characters are number I want to convert to the format;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0000000001 where Header1 is 1&lt;/P&gt;&lt;P&gt;0000000134 where Header1 is 134&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for the cells where the string contains a mix of letters and number I want to leave them as they are.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried using this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Header1new = put(input(header1,20.),z10.);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This converts the numbers the way I want but it produces loads of errors for the non-numbers. Is there code that allows for this i.e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the string header 1 contains at least one character then do leave as is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Jul 2015 14:15:09 GMT</pubDate>
    <dc:creator>brophymj</dc:creator>
    <dc:date>2015-07-14T14:15:09Z</dc:date>
    <item>
      <title>Format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/202190#M50468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a field Header1 ($20) of the form:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="224" style="border: 1px solid rgb(0, 0, 0); width: 171px; height: 180px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Header 1&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;485&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;AB27834&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;134&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A/DD123&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;678423167&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;AB1266&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and where the cell is a string where the characters are number I want to convert to the format;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0000000001 where Header1 is 1&lt;/P&gt;&lt;P&gt;0000000134 where Header1 is 134&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for the cells where the string contains a mix of letters and number I want to leave them as they are.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried using this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Header1new = put(input(header1,20.),z10.);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This converts the numbers the way I want but it produces loads of errors for the non-numbers. Is there code that allows for this i.e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the string header 1 contains at least one character then do leave as is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 14:15:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/202190#M50468</guid>
      <dc:creator>brophymj</dc:creator>
      <dc:date>2015-07-14T14:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/202191#M50469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Almost there;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyalpha(Header1) = 0 then Header1new = put(input(header1,20.),z10.);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 14:17:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/202191#M50469</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-07-14T14:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: Format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/202192#M50470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to test if it is a number.&amp;nbsp; Also what about values that look like numbers such as:&lt;/P&gt;&lt;P&gt;1.5&lt;/P&gt;&lt;P&gt;12E5&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 14:29:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/202192#M50470</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-07-14T14:29:15Z</dc:date>
    </item>
  </channel>
</rss>

