<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:gd="http://schemas.google.com/g/2005"><id>tag:blogger.com,1999:blog-7958828565254404797.post4191391765359702208..comments</id><updated>2024-12-13T03:11:35.450-08:00</updated><title type='text'>Comments on ListenData: SAS : Add leading zeros to Variable</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://www.listendata.com/feeds/comments/default'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4191391765359702208/comments/default'/><link rel='alternate' type='text/html' href='https://www.listendata.com/2016/07/sas-add-leading-zeros-to-variable.html'/><link rel="hub" href="http://pubsubhubbub.appspot.com/"/><author><name>Deepanshu Bhalla</name><uri>http://www.blogger.com/profile/09802839558125192674</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXm_iOrXFR9Ls-mjtOci4qd1m1V1TXkkWJINuMy84-Axo5pNS6CG7oKwR7hfHHI3tB1yuz8W_qo9HK2Cw5fHfe_4cL_2DCf_LyoK9LMLicZojbNYgypIP-RXNsw1GsVhk/s100/pic.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7958828565254404797.post-3991369901288301826</id><published>2020-08-13T06:30:28.801-07:00</published><updated>2020-08-13T06:30:28.801-07:00</updated><title type='text'>Thanks for the example. I have a similar problem b...</title><content type='html'>Thanks for the example. I have a similar problem but I only want to add the 0 if my string length is shorter than the wanted number of arguments. As in I have values &amp;quot;23A&amp;quot;, &amp;quot;17&amp;quot;, &amp;quot;265B&amp;quot; and I want them to be returned as &amp;quot;023A&amp;quot;, &amp;quot;0017&amp;quot;, and &amp;quot;265B&amp;quot;. The above code seems to do the job. However I get a note saying that the values parsed in argument 2 are invalid. This is no surprice as I get negative values when I substract the extra 1. If I don&amp;#39;t then I will get a 0 in front of everything. Can I avoid this 0?&lt;br /&gt;I use the below code&lt;br /&gt;cats(repeat(&amp;#39;0&amp;#39;,4-length(x)), x)</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4191391765359702208/comments/default/3991369901288301826'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4191391765359702208/comments/default/3991369901288301826'/><link rel='alternate' type='text/html' href='https://www.listendata.com/2016/07/sas-add-leading-zeros-to-variable.html?showComment=1597325428801#c3991369901288301826' title=''/><author><name>Line</name><uri>https://www.blogger.com/profile/16827466186159580533</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.listendata.com/2016/07/sas-add-leading-zeros-to-variable.html' ref='tag:blogger.com,1999:blog-7958828565254404797.post-4191391765359702208' source='http://www.blogger.com/feeds/7958828565254404797/posts/default/4191391765359702208' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-804105088"/><gd:extendedProperty name="blogger.displayTime" value="August 13, 2020 at 6:30 AM"/></entry><entry><id>tag:blogger.com,1999:blog-7958828565254404797.post-823520795200459755</id><published>2020-08-05T21:35:22.304-07:00</published><updated>2020-08-05T21:35:22.304-07:00</updated><title type='text'>multily id with 1 &#xa;eg : newid=id*1 &#xa;&#xa;it will remov...</title><content type='html'>multily id with 1 &lt;br /&gt;eg : newid=id*1 &lt;br /&gt;&lt;br /&gt;it will remove all leading 0&amp;#39;s if we have number values .</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4191391765359702208/comments/default/823520795200459755'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4191391765359702208/comments/default/823520795200459755'/><link rel='alternate' type='text/html' href='https://www.listendata.com/2016/07/sas-add-leading-zeros-to-variable.html?showComment=1596688522304#c823520795200459755' title=''/><link rel='related' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4191391765359702208/comments/default/6779856641588185071'/><author><name>Anonymous</name><uri>https://www.blogger.com/profile/04926032502040026375</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.listendata.com/2016/07/sas-add-leading-zeros-to-variable.html' ref='tag:blogger.com,1999:blog-7958828565254404797.post-4191391765359702208' source='http://www.blogger.com/feeds/7958828565254404797/posts/default/4191391765359702208' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-860665413"/><gd:extendedProperty name="blogger.displayTime" value="August 5, 2020 at 9:35 PM"/></entry><entry><id>tag:blogger.com,1999:blog-7958828565254404797.post-6779856641588185071</id><published>2019-04-20T06:49:43.148-07:00</published><updated>2019-04-20T06:49:43.148-07:00</updated><title type='text'>Hi how are you. I have dataset,&#xa;id= 001,002,003,00...</title><content type='html'>Hi how are you. I have dataset,&lt;br /&gt;id= 001,002,003,004,005&lt;br /&gt;I want newid= 1,2,3,4,5&lt;br /&gt;both are numeric. please resolve the issue</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4191391765359702208/comments/default/6779856641588185071'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4191391765359702208/comments/default/6779856641588185071'/><link rel='alternate' type='text/html' href='https://www.listendata.com/2016/07/sas-add-leading-zeros-to-variable.html?showComment=1555768183148#c6779856641588185071' title=''/><author><name>Manav</name><uri>https://www.blogger.com/profile/08511586074988320100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.listendata.com/2016/07/sas-add-leading-zeros-to-variable.html' ref='tag:blogger.com,1999:blog-7958828565254404797.post-4191391765359702208' source='http://www.blogger.com/feeds/7958828565254404797/posts/default/4191391765359702208' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-181894993"/><gd:extendedProperty name="blogger.displayTime" value="April 20, 2019 at 6:49 AM"/></entry><entry><id>tag:blogger.com,1999:blog-7958828565254404797.post-7978415420318926209</id><published>2019-01-29T04:53:54.687-08:00</published><updated>2019-01-29T04:53:54.687-08:00</updated><title type='text'>REPEAT (argument,n) The REPEAT function returns a ...</title><content type='html'>REPEAT (argument,n) The REPEAT function returns a character value consisting of the first argument repeated n times. repeat(&amp;#39;0&amp;#39;,6-4-1) =repeat(0,1) means,0 will be repeated 1 time, hence 00 will be concatenated with X variable ( because length function determined length of x as 4 , so 2 times 0 will be concatenated ) </content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4191391765359702208/comments/default/7978415420318926209'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4191391765359702208/comments/default/7978415420318926209'/><link rel='alternate' type='text/html' href='https://www.listendata.com/2016/07/sas-add-leading-zeros-to-variable.html?showComment=1548766434687#c7978415420318926209' title=''/><link rel='related' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4191391765359702208/comments/default/8378883736620285640'/><author><name>Anonymous</name><uri>https://www.blogger.com/profile/00432502176387329655</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.listendata.com/2016/07/sas-add-leading-zeros-to-variable.html' ref='tag:blogger.com,1999:blog-7958828565254404797.post-4191391765359702208' source='http://www.blogger.com/feeds/7958828565254404797/posts/default/4191391765359702208' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-870796346"/><gd:extendedProperty name="blogger.displayTime" value="January 29, 2019 at 4:53 AM"/></entry><entry><id>tag:blogger.com,1999:blog-7958828565254404797.post-3976676953571303564</id><published>2018-08-17T12:14:05.750-07:00</published><updated>2018-08-17T12:14:05.750-07:00</updated><title type='text'>This is excellent - straight forward and very easy...</title><content type='html'>This is excellent - straight forward and very easy to follow and implement.  Thanks </content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4191391765359702208/comments/default/3976676953571303564'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4191391765359702208/comments/default/3976676953571303564'/><link rel='alternate' type='text/html' href='https://www.listendata.com/2016/07/sas-add-leading-zeros-to-variable.html?showComment=1534533245750#c3976676953571303564' title=''/><author><name>Anonymous</name><uri>https://www.blogger.com/profile/09470068461601617888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.listendata.com/2016/07/sas-add-leading-zeros-to-variable.html' ref='tag:blogger.com,1999:blog-7958828565254404797.post-4191391765359702208' source='http://www.blogger.com/feeds/7958828565254404797/posts/default/4191391765359702208' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-223207630"/><gd:extendedProperty name="blogger.displayTime" value="August 17, 2018 at 12:14 PM"/></entry><entry><id>tag:blogger.com,1999:blog-7958828565254404797.post-8378883736620285640</id><published>2018-02-06T07:01:34.795-08:00</published><updated>2018-02-06T07:01:34.795-08:00</updated><title type='text'>Hi, this was extremely helpful, but I don&amp;#39;t th...</title><content type='html'>Hi, this was extremely helpful, but I don&amp;#39;t think I still understand the -1 after length(x). Can you elaborate? Thank you!&lt;br /&gt;&lt;br /&gt;</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4191391765359702208/comments/default/8378883736620285640'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4191391765359702208/comments/default/8378883736620285640'/><link rel='alternate' type='text/html' href='https://www.listendata.com/2016/07/sas-add-leading-zeros-to-variable.html?showComment=1517929294795#c8378883736620285640' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.listendata.com/2016/07/sas-add-leading-zeros-to-variable.html' ref='tag:blogger.com,1999:blog-7958828565254404797.post-4191391765359702208' source='http://www.blogger.com/feeds/7958828565254404797/posts/default/4191391765359702208' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-6939909"/><gd:extendedProperty name="blogger.displayTime" value="February 6, 2018 at 7:01 AM"/></entry><entry><id>tag:blogger.com,1999:blog-7958828565254404797.post-8111042265896564225</id><published>2017-02-28T22:49:17.120-08:00</published><updated>2017-02-28T22:49:17.120-08:00</updated><title type='text'>Thanks for that..!&#xa;It saves me lot of time..!&#xa;Grea...</title><content type='html'>Thanks for that..!&lt;br /&gt;It saves me lot of time..!&lt;br /&gt;Great..</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4191391765359702208/comments/default/8111042265896564225'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4191391765359702208/comments/default/8111042265896564225'/><link rel='alternate' type='text/html' href='https://www.listendata.com/2016/07/sas-add-leading-zeros-to-variable.html?showComment=1488350957120#c8111042265896564225' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.listendata.com/2016/07/sas-add-leading-zeros-to-variable.html' ref='tag:blogger.com,1999:blog-7958828565254404797.post-4191391765359702208' source='http://www.blogger.com/feeds/7958828565254404797/posts/default/4191391765359702208' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-6939909"/><gd:extendedProperty name="blogger.displayTime" value="February 28, 2017 at 10:49 PM"/></entry><entry><id>tag:blogger.com,1999:blog-7958828565254404797.post-8849568842094818140</id><published>2016-11-14T03:13:54.075-08:00</published><updated>2016-11-14T03:13:54.075-08:00</updated><title type='text'>Great stuff. Keep it up!</title><content type='html'>Great stuff. Keep it up!</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4191391765359702208/comments/default/8849568842094818140'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7958828565254404797/4191391765359702208/comments/default/8849568842094818140'/><link rel='alternate' type='text/html' href='https://www.listendata.com/2016/07/sas-add-leading-zeros-to-variable.html?showComment=1479122034075#c8849568842094818140' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='https://www.listendata.com/2016/07/sas-add-leading-zeros-to-variable.html' ref='tag:blogger.com,1999:blog-7958828565254404797.post-4191391765359702208' source='http://www.blogger.com/feeds/7958828565254404797/posts/default/4191391765359702208' type='text/html'/><gd:extendedProperty name="blogger.itemClass" value="pid-6939909"/><gd:extendedProperty name="blogger.displayTime" value="November 14, 2016 at 3:13 AM"/></entry></feed>