 




<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Clear leading zeros</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/clear-leading-zeros/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/clear-leading-zeros/</link>
	<description></description>
	<lastBuildDate>Fri, 24 May 2013 17:13:17 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: bigkat</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/clear-leading-zeros/#comment-69882</link>
		<dc:creator>bigkat</dc:creator>
		<pubDate>Tue, 03 Nov 2009 12:56:52 +0000</pubDate>
		<guid isPermaLink="false">#comment-69882</guid>
		<description><![CDATA[Darn you  Sloopy, distracting me with a phone call  :)  

I&#039;ll beat you next time (or maybe the one after that or...)]]></description>
		<content:encoded><![CDATA[<p>Darn you  Sloopy, distracting me with a phone call  <img src='http://itknowledgeexchange.techtarget.com/itanswers/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   </p>
<p>I&#8217;ll beat you next time (or maybe the one after that or&#8230;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sloopy</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/clear-leading-zeros/#comment-69842</link>
		<dc:creator>sloopy</dc:creator>
		<pubDate>Mon, 02 Nov 2009 16:51:02 +0000</pubDate>
		<guid isPermaLink="false">#comment-69842</guid>
		<description><![CDATA[Kat, who do think made the phone call?]]></description>
		<content:encoded><![CDATA[<p>Kat, who do think made the phone call?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: neild</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/clear-leading-zeros/#comment-69747</link>
		<dc:creator>neild</dc:creator>
		<pubDate>Fri, 30 Oct 2009 15:07:28 +0000</pubDate>
		<guid isPermaLink="false">#comment-69747</guid>
		<description><![CDATA[&lt;i&gt;EVALR trimmed = %triml( myField : ’0 ’)&lt;/i&gt;

Brilliant, thanks for everyones help.

Neil.]]></description>
		<content:encoded><![CDATA[<p><i>EVALR trimmed = %triml( myField : ’0 ’)</i></p>
<p>Brilliant, thanks for everyones help.</p>
<p>Neil.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bigkat</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/clear-leading-zeros/#comment-69731</link>
		<dc:creator>bigkat</dc:creator>
		<pubDate>Fri, 30 Oct 2009 13:44:48 +0000</pubDate>
		<guid isPermaLink="false">#comment-69731</guid>
		<description><![CDATA[whoops :D

Guess Sloopy beat me in with the answer while I got tied up on a phone call!  

&lt;i&gt;Darn work getting in the way of things! &lt;/i&gt;  :)]]></description>
		<content:encoded><![CDATA[<p>whoops <img src='http://itknowledgeexchange.techtarget.com/itanswers/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Guess Sloopy beat me in with the answer while I got tied up on a phone call!  </p>
<p><i>Darn work getting in the way of things! </i>  <img src='http://itknowledgeexchange.techtarget.com/itanswers/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bigkat</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/clear-leading-zeros/#comment-69730</link>
		<dc:creator>bigkat</dc:creator>
		<pubDate>Fri, 30 Oct 2009 13:41:51 +0000</pubDate>
		<guid isPermaLink="false">#comment-69730</guid>
		<description><![CDATA[&lt;pre&gt;
d field1          s             10a   inz(&#039;0000098030&#039;)      
d field2          s             10a                          
&lt;b&gt;c                   evalr     field2 = %triml(field1:&#039;0&#039;)    &lt;/b&gt;
c                   eval      *inlr = *on                    
c                   dump(a)                                  

FIELD1                CHAR(10)             &#039;0000098030&#039;
FIELD2                CHAR(10)             &#039;     98030&#039;
&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<pre>
d field1          s             10a   inz('0000098030')      
d field2          s             10a                          
<b>c                   evalr     field2 = %triml(field1:'0')    </b>
c                   eval      *inlr = *on                    
c                   dump(a)                                  

FIELD1                CHAR(10)             '0000098030'
FIELD2                CHAR(10)             '     98030'
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: nullfields</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/clear-leading-zeros/#comment-69729</link>
		<dc:creator>nullfields</dc:creator>
		<pubDate>Fri, 30 Oct 2009 13:37:45 +0000</pubDate>
		<guid isPermaLink="false">#comment-69729</guid>
		<description><![CDATA[In COBOL you can use the INSPECT verb with the REPLACE LEADING ZEROES option.]]></description>
		<content:encoded><![CDATA[<p>In COBOL you can use the INSPECT verb with the REPLACE LEADING ZEROES option.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sloopy</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/clear-leading-zeros/#comment-69724</link>
		<dc:creator>sloopy</dc:creator>
		<pubDate>Fri, 30 Oct 2009 13:15:35 +0000</pubDate>
		<guid isPermaLink="false">#comment-69724</guid>
		<description><![CDATA[Oh - forgot. You need to use the opcode EVALR, which will right-adjust the result.

EVALR    trimmed = %triml( myField : ’0 ’)]]></description>
		<content:encoded><![CDATA[<p>Oh &#8211; forgot. You need to use the opcode EVALR, which will right-adjust the result.</p>
<p>EVALR    trimmed = %triml( myField : ’0 ’)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sloopy</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/clear-leading-zeros/#comment-69723</link>
		<dc:creator>sloopy</dc:creator>
		<pubDate>Fri, 30 Oct 2009 13:13:17 +0000</pubDate>
		<guid isPermaLink="false">#comment-69723</guid>
		<description><![CDATA[You have a number in a character field, and want the leading zeros removed.

So, use this:

trimmed = %triml( myField  : ’0 ’)

The second parameter contains a zero and a blank. The Trim Left BIF will trim BOTH those values off the LEFT side of the value, and place the result in the field TRIMMED.

Regards,

Sloopy]]></description>
		<content:encoded><![CDATA[<p>You have a number in a character field, and want the leading zeros removed.</p>
<p>So, use this:</p>
<p>trimmed = %triml( myField  : ’0 ’)</p>
<p>The second parameter contains a zero and a blank. The Trim Left BIF will trim BOTH those values off the LEFT side of the value, and place the result in the field TRIMMED.</p>
<p>Regards,</p>
<p>Sloopy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: neild</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/clear-leading-zeros/#comment-69720</link>
		<dc:creator>neild</dc:creator>
		<pubDate>Fri, 30 Oct 2009 09:42:07 +0000</pubDate>
		<guid isPermaLink="false">#comment-69720</guid>
		<description><![CDATA[&lt;i&gt;What data type is the column in “another file”? If it’s also CHAR(10), do you want left-or right-justified?

Tom&lt;/i&gt;

Hi,

Both fields are 10A and I need it right justified.

Neil.]]></description>
		<content:encoded><![CDATA[<p><i>What data type is the column in “another file”? If it’s also CHAR(10), do you want left-or right-justified?</p>
<p>Tom</i></p>
<p>Hi,</p>
<p>Both fields are 10A and I need it right justified.</p>
<p>Neil.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/clear-leading-zeros/#comment-69711</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Fri, 30 Oct 2009 02:07:56 +0000</pubDate>
		<guid isPermaLink="false">#comment-69711</guid>
		<description><![CDATA[&lt;i&gt;I need to remove the leading zeros prior to inserting the field into another file.&lt;/i&gt;

What data type is the column in &quot;another file&quot;? If it&#039;s also CHAR(10), do you want left-or right-justified?

Tom]]></description>
		<content:encoded><![CDATA[<p><i>I need to remove the leading zeros prior to inserting the field into another file.</i></p>
<p>What data type is the column in &#8220;another file&#8221;? If it&#8217;s also CHAR(10), do you want left-or right-justified?</p>
<p>Tom</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 6/8 queries in 0.022 seconds using memcached
Object Caching 407/408 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-24 18:14:40 -->