<?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: How to patch &amp;quot;0&amp;quot;s ahead a string?! in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-patch-quot-0-quot-s-ahead-a-string/m-p/794855#M254893</link>
    <description>Start with the dataset below

data _temp;
input tick $;
datalines;
12
1234
654321
; run;quit;</description>
    <pubDate>Mon, 07 Feb 2022 18:56:07 GMT</pubDate>
    <dc:creator>hellohere</dc:creator>
    <dc:date>2022-02-07T18:56:07Z</dc:date>
    <item>
      <title>How to patch "0"s ahead a string?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-patch-quot-0-quot-s-ahead-a-string/m-p/794854#M254892</link>
      <description>&lt;P&gt;Say I have dataset below(x is 0-9 digit).&lt;/P&gt;
&lt;P&gt;xx&lt;/P&gt;
&lt;P&gt;xxx&lt;/P&gt;
&lt;P&gt;xxxxxx&lt;/P&gt;
&lt;P&gt;need patch "0"s ahead of them to make them like[length=6; patch 0s ahead if number of digits are less than 6]&lt;/P&gt;
&lt;P&gt;0000xx&lt;/P&gt;
&lt;P&gt;000xxx&lt;/P&gt;
&lt;P&gt;xxxxxx&lt;/P&gt;
&lt;P&gt;How to do it? Anyone?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 18:53:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-patch-quot-0-quot-s-ahead-a-string/m-p/794854#M254892</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-02-07T18:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to patch "0"s ahead a string?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-patch-quot-0-quot-s-ahead-a-string/m-p/794855#M254893</link>
      <description>Start with the dataset below

data _temp;
input tick $;
datalines;
12
1234
654321
; run;quit;</description>
      <pubDate>Mon, 07 Feb 2022 18:56:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-patch-quot-0-quot-s-ahead-a-string/m-p/794855#M254893</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-02-07T18:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to patch "0"s ahead a string?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-patch-quot-0-quot-s-ahead-a-string/m-p/794857#M254895</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data have;
  input var1 $6.;
  cards;
xx
xxx
xxxxxx
;


data want;
  set have;
  need=translate(right(var1),'0',' ');
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 07 Feb 2022 19:02:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-patch-quot-0-quot-s-ahead-a-string/m-p/794857#M254895</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2022-02-07T19:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to patch "0"s ahead a string?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-patch-quot-0-quot-s-ahead-a-string/m-p/794860#M254896</link>
      <description>Thanks a lot!</description>
      <pubDate>Mon, 07 Feb 2022 19:09:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-patch-quot-0-quot-s-ahead-a-string/m-p/794860#M254896</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-02-07T19:09:28Z</dc:date>
    </item>
  </channel>
</rss>

