<?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 Leading Zero in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Leading-Zero/m-p/399119#M96631</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to put leading zeros into my code but I can't seem to get it to work, any ideas please?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data test1; &lt;BR /&gt; set steve_201708; &lt;BR /&gt; length mortgage1 $10.; &lt;BR /&gt; mortgage1=(put(input(mortgage,z10.),Z10.)); &lt;BR /&gt; keep mortgage mortgage1; &lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Sep 2017 11:18:56 GMT</pubDate>
    <dc:creator>anonymous_user</dc:creator>
    <dc:date>2017-09-27T11:18:56Z</dc:date>
    <item>
      <title>Leading Zero</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Leading-Zero/m-p/399119#M96631</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to put leading zeros into my code but I can't seem to get it to work, any ideas please?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data test1; &lt;BR /&gt; set steve_201708; &lt;BR /&gt; length mortgage1 $10.; &lt;BR /&gt; mortgage1=(put(input(mortgage,z10.),Z10.)); &lt;BR /&gt; keep mortgage mortgage1; &lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2017 11:18:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Leading-Zero/m-p/399119#M96631</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2017-09-27T11:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: Leading Zero</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Leading-Zero/m-p/399123#M96634</link>
      <description>&lt;P&gt;The input() function requires an informat, and there is no Zw. informat (there is only the output format Zw.)&lt;/P&gt;
&lt;P&gt;So you just need to adapt the informat:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test1;
set steve_201708;
length mortgage1 $10.;
mortgage1=(put(input(mortgage,10.),Z10.));
keep mortgage mortgage1;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Is mortgage really a character variable, or is it numeric? If the latter, just doing&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;mortgage1=put(mortgage,Z10.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;would be sufficient.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2017 11:30:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Leading-Zero/m-p/399123#M96634</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-09-27T11:30:56Z</dc:date>
    </item>
  </channel>
</rss>

