<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://try-as400.pocnet.net/index.php?action=history&amp;feed=atom&amp;title=Using_floating_point_numbers_in_RPG</id>
	<title>Using floating point numbers in RPG - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://try-as400.pocnet.net/index.php?action=history&amp;feed=atom&amp;title=Using_floating_point_numbers_in_RPG"/>
	<link rel="alternate" type="text/html" href="http://try-as400.pocnet.net/index.php?title=Using_floating_point_numbers_in_RPG&amp;action=history"/>
	<updated>2026-04-27T12:02:21Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>http://try-as400.pocnet.net/index.php?title=Using_floating_point_numbers_in_RPG&amp;diff=1296&amp;oldid=prev</id>
		<title>PoC: +Link</title>
		<link rel="alternate" type="text/html" href="http://try-as400.pocnet.net/index.php?title=Using_floating_point_numbers_in_RPG&amp;diff=1296&amp;oldid=prev"/>
		<updated>2023-02-23T21:27:47Z</updated>

		<summary type="html">&lt;p&gt;+Link&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:27, 23 February 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l19&quot;&gt;Line 19:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 19:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Do not attempt to use &amp;lt;code&amp;gt;MOVE&amp;lt;/code&amp;gt; for copying floating point data between variables. If you do, the compiler will give you error RNF7547. You must use &amp;lt;code&amp;gt;EVAL&amp;lt;/code&amp;gt; as shown above.&amp;lt;ref&amp;gt;This raises questions about how to program with floating point variables in pre-ILE RPG.&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Do not attempt to use &amp;lt;code&amp;gt;MOVE&amp;lt;/code&amp;gt; for copying floating point data between variables. If you do, the compiler will give you error RNF7547. You must use &amp;lt;code&amp;gt;EVAL&amp;lt;/code&amp;gt; as shown above.&amp;lt;ref&amp;gt;This raises questions about how to program with floating point variables in pre-ILE RPG.&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== See also ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*[[Using timestamps in RPG]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Weblinks ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Weblinks ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>PoC</name></author>
	</entry>
	<entry>
		<id>http://try-as400.pocnet.net/index.php?title=Using_floating_point_numbers_in_RPG&amp;diff=1294&amp;oldid=prev</id>
		<title>PoC: Typo</title>
		<link rel="alternate" type="text/html" href="http://try-as400.pocnet.net/index.php?title=Using_floating_point_numbers_in_RPG&amp;diff=1294&amp;oldid=prev"/>
		<updated>2023-02-23T21:18:44Z</updated>

		<summary type="html">&lt;p&gt;Typo&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:18, 23 February 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Using &#039;&#039;&#039; floating point numbers in RPG&#039;&#039;&#039; is not as straightforward as using character, or decimal fields.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Using &#039;&#039;&#039;floating point numbers in RPG&#039;&#039;&#039; is not as straightforward as using character, or decimal fields.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Not unlike date/time/timestamp fields, RPG has an &amp;#039;&amp;#039;internal&amp;#039;&amp;#039; way to handle those data types, which is incompatible with the &amp;#039;&amp;#039;external&amp;#039;&amp;#039; representation in externally described fields, such as database- and display files. While adding the internal date/time handling routines is a compile time option, this isn&amp;#039;t the case for floating point operations.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Not unlike date/time/timestamp fields, RPG has an &amp;#039;&amp;#039;internal&amp;#039;&amp;#039; way to handle those data types, which is incompatible with the &amp;#039;&amp;#039;external&amp;#039;&amp;#039; representation in externally described fields, such as database- and display files. While adding the internal date/time handling routines is a compile time option, this isn&amp;#039;t the case for floating point operations.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>PoC</name></author>
	</entry>
	<entry>
		<id>http://try-as400.pocnet.net/index.php?title=Using_floating_point_numbers_in_RPG&amp;diff=1293&amp;oldid=prev</id>
		<title>PoC: New</title>
		<link rel="alternate" type="text/html" href="http://try-as400.pocnet.net/index.php?title=Using_floating_point_numbers_in_RPG&amp;diff=1293&amp;oldid=prev"/>
		<updated>2023-02-23T21:16:19Z</updated>

		<summary type="html">&lt;p&gt;New&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Using &amp;#039;&amp;#039;&amp;#039; floating point numbers in RPG&amp;#039;&amp;#039;&amp;#039; is not as straightforward as using character, or decimal fields.&lt;br /&gt;
&lt;br /&gt;
Not unlike date/time/timestamp fields, RPG has an &amp;#039;&amp;#039;internal&amp;#039;&amp;#039; way to handle those data types, which is incompatible with the &amp;#039;&amp;#039;external&amp;#039;&amp;#039; representation in externally described fields, such as database- and display files. While adding the internal date/time handling routines is a compile time option, this isn&amp;#039;t the case for floating point operations.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
* PF:&lt;br /&gt;
 A            S_TEMPVAL      4F 1&lt;br /&gt;
&lt;br /&gt;
* DSPF:&lt;br /&gt;
 A            S_TEMPVAL$     4Y 1O 16 52EDTCDE(P)&lt;br /&gt;
&lt;br /&gt;
* RPGLE:&lt;br /&gt;
 C                   EVAL      S_TEMPVAL$ = S_TEMPVAL&lt;br /&gt;
&lt;br /&gt;
=== Pitfalls ===&lt;br /&gt;
If you derive the DSPF field by referencing the PF field, the compiler will give you error RNF7452.&lt;br /&gt;
&lt;br /&gt;
If you create an unreferenced DSPF field with type &amp;lt;code&amp;gt;F&amp;lt;/code&amp;gt;, you&amp;#039;ll get output in &amp;#039;&amp;#039;scientific&amp;#039;&amp;#039; notation with numbers and an exponent. If this isn&amp;#039;t what you want, define the field as pure numeric &amp;lt;code&amp;gt;F&amp;lt;/code&amp;gt; as shown in the example above.&lt;br /&gt;
&lt;br /&gt;
Do not attempt to use &amp;lt;code&amp;gt;MOVE&amp;lt;/code&amp;gt; for copying floating point data between variables. If you do, the compiler will give you error RNF7547. You must use &amp;lt;code&amp;gt;EVAL&amp;lt;/code&amp;gt; as shown above.&amp;lt;ref&amp;gt;This raises questions about how to program with floating point variables in pre-ILE RPG.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Weblinks ==&lt;br /&gt;
* [https://www.ibm.com/docs/en/rdfi/9.6.0?topic=SSAE4W_9.6.0/com.ibm.etools.iseries.ilerpg.doc/RNF7452.html RNF7452], IBM Rational Developer for i&lt;br /&gt;
* [https://www.ibm.com/docs/en/rdfi/9.6.0?topic=SSAE4W_9.6.0/com.ibm.etools.iseries.ilerpg.doc/RNF7547.html RNF7547], IBM Rational Developer for i&lt;br /&gt;
&lt;br /&gt;
== Footnotes ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Programming]]&lt;/div&gt;</summary>
		<author><name>PoC</name></author>
	</entry>
</feed>