<?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: Getting a decimal data error when making a change in COBOL AS/400</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/moving-decimal-type-to/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/moving-decimal-type-to/</link>
	<description></description>
	<lastBuildDate>Tue, 18 Jun 2013 21:45:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: itkr</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/moving-decimal-type-to/#comment-78725</link>
		<dc:creator>itkr</dc:creator>
		<pubDate>Wed, 30 Jun 2010 13:45:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-78725</guid>
		<description><![CDATA[yes Tom, the issue was with the fiel defnition, I changed it to COPY DD-ALL-FORMATS OF FILE-NAME and used the fields and i could overcome this issue. Initially i had to change this way because of other issues. But after fixing that i forgot to revert this...
once again thanks for the help !!]]></description>
		<content:encoded><![CDATA[<p>yes Tom, the issue was with the fiel defnition, I changed it to COPY DD-ALL-FORMATS OF FILE-NAME and used the fields and i could overcome this issue. Initially i had to change this way because of other issues. But after fixing that i forgot to revert this&#8230;<br />
once again thanks for the help !!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/moving-decimal-type-to/#comment-78391</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Mon, 21 Jun 2010 22:11:35 +0000</pubDate>
		<guid isPermaLink="false">#comment-78391</guid>
		<description><![CDATA[&lt;i&gt;the field is of decimal length 3.&lt;/i&gt; That information is one piece. This is another: &lt;i&gt;Value is coming as 404&lt;/i&gt;.

Together, those indicate a very good chance that the field has not been initialized. When a packed decimal value shows only the digits {40}, there is always the chance that blanks are part of the field.

A 3-digit packed decimal field takes two bytes. Two bytes of blanks would have a hexadecimal value of x&#039;4040&#039;. The last position would be reserved for the numeric sign -- positive or negative. So the digits portion would be &#039;404&#039;.

If you are using SQL, how are you using the /COPY statement? Hopefully, it is in the WORKING-STORAGE section.

The decimal-data error is almost certainly caused by an invalid sign, probably caused by improper initialization of the field. There has been no value assigned to the packed-decimal field, so it remains as blanks. When you try to convert the packed value to a character representation, the invalid sign signals a data error.

However, since you still haven&#039;t shown the field definitions nor the statements that get the error nor the statements that set the values, it&#039;s still a guess.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>the field is of decimal length 3.</i> That information is one piece. This is another: <i>Value is coming as 404</i>.</p>
<p>Together, those indicate a very good chance that the field has not been initialized. When a packed decimal value shows only the digits {40}, there is always the chance that blanks are part of the field.</p>
<p>A 3-digit packed decimal field takes two bytes. Two bytes of blanks would have a hexadecimal value of x&#8217;4040&#8242;. The last position would be reserved for the numeric sign &#8212; positive or negative. So the digits portion would be &#8217;404&#8242;.</p>
<p>If you are using SQL, how are you using the /COPY statement? Hopefully, it is in the WORKING-STORAGE section.</p>
<p>The decimal-data error is almost certainly caused by an invalid sign, probably caused by improper initialization of the field. There has been no value assigned to the packed-decimal field, so it remains as blanks. When you try to convert the packed value to a character representation, the invalid sign signals a data error.</p>
<p>However, since you still haven&#8217;t shown the field definitions nor the statements that get the error nor the statements that set the values, it&#8217;s still a guess.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: itkr</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/moving-decimal-type-to/#comment-78343</link>
		<dc:creator>itkr</dc:creator>
		<pubDate>Sat, 19 Jun 2010 12:29:33 +0000</pubDate>
		<guid isPermaLink="false">#comment-78343</guid>
		<description><![CDATA[Thanks Tom,, 
abt (1) to show the definition of fields, old input file was defined as copy all COPY DD-ALL-FORMATS OF. Opening that file in sql I could see the field is of numeric length 3. The out put file to which this field is moved PIC X(070). 
Now the new input file, i have used the same COPY DD-ALL-FORMATS OF in the COBOL, but the field is of decimal length 3. This is being moved into the same output file PIC X(070). 
(2) Value is coming as 404 where as the actual value of the field should be read as 019
I am not sure whether this new field needs to be converted from decimal to other form ? Or is issue in declaring this input file. I do not think I can change the output file format to which it is being moved. May be issue in declaring this new file ???]]></description>
		<content:encoded><![CDATA[<p>Thanks Tom,,<br />
abt (1) to show the definition of fields, old input file was defined as copy all COPY DD-ALL-FORMATS OF. Opening that file in sql I could see the field is of numeric length 3. The out put file to which this field is moved PIC X(070).<br />
Now the new input file, i have used the same COPY DD-ALL-FORMATS OF in the COBOL, but the field is of decimal length 3. This is being moved into the same output file PIC X(070).<br />
(2) Value is coming as 404 where as the actual value of the field should be read as 019<br />
I am not sure whether this new field needs to be converted from decimal to other form ? Or is issue in declaring this input file. I do not think I can change the output file format to which it is being moved. May be issue in declaring this new file ???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/moving-decimal-type-to/#comment-78314</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Fri, 18 Jun 2010 23:19:39 +0000</pubDate>
		<guid isPermaLink="false">#comment-78314</guid>
		<description><![CDATA[&lt;i&gt;But now while debugging the code; I&#039;m getting decimal data error. How will i decalre or move from decimal file ?&lt;/i&gt;

My suggestion is to show us (1) the definitions of both fields and (2) the value in the source field since you can see it in debug. If we don&#039;t know the definitions and the value, we can only give guesses. The guesses won&#039;t include any directions on what you might need to change.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>But now while debugging the code; I&#8217;m getting decimal data error. How will i decalre or move from decimal file ?</i></p>
<p>My suggestion is to show us (1) the definitions of both fields and (2) the value in the source field since you can see it in debug. If we don&#8217;t know the definitions and the value, we can only give guesses. The guesses won&#8217;t include any directions on what you might need to change.</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 3/10 queries in 0.039 seconds using memcached
Object Caching 309/315 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-06-18 21:52:00 -->