 




<?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: RPGLE Flat File</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/file-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/file-2/</link>
	<description></description>
	<lastBuildDate>Sat, 18 May 2013 14:11:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: narasimhareddy</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/file-2/#comment-70964</link>
		<dc:creator>narasimhareddy</dc:creator>
		<pubDate>Sat, 28 Nov 2009 10:40:09 +0000</pubDate>
		<guid isPermaLink="false">#comment-70964</guid>
		<description><![CDATA[If it is a single field flat file, you can use OPNQRYF and define a field with substring of flat file record and make the new field as Key. OPNQRYF has option to define new field and use it as Key.]]></description>
		<content:encoded><![CDATA[<p>If it is a single field flat file, you can use OPNQRYF and define a field with substring of flat file record and make the new field as Key. OPNQRYF has option to define new field and use it as Key.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/file-2/#comment-70938</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Fri, 27 Nov 2009 10:41:49 +0000</pubDate>
		<guid isPermaLink="false">#comment-70938</guid>
		<description><![CDATA[If the file is a &quot;flat file&quot; that doesn&#039;t actually have an external key (no keyed access path exists), then it doesn&#039;t matter how you code the RPG. &quot;Flat file&quot; and &quot;key&quot; are mutually exclusive in that sense.

However, you &lt;i&gt;might&lt;/i&gt; be able to cause a keyed access path to be created. Maybe. It&#039;s been far too many years.

STRIDU -- Start Interactive Data Definition Utility -- IDDU

Maybe you can apply a data definition to your flat file and define a key. (I can&#039;t recall if this is even possible, and I sure don&#039;t have time to re-learn IDDU nowadays.)

Tom]]></description>
		<content:encoded><![CDATA[<p>If the file is a &#8220;flat file&#8221; that doesn&#8217;t actually have an external key (no keyed access path exists), then it doesn&#8217;t matter how you code the RPG. &#8220;Flat file&#8221; and &#8220;key&#8221; are mutually exclusive in that sense.</p>
<p>However, you <i>might</i> be able to cause a keyed access path to be created. Maybe. It&#8217;s been far too many years.</p>
<p>STRIDU &#8212; Start Interactive Data Definition Utility &#8212; IDDU</p>
<p>Maybe you can apply a data definition to your flat file and define a key. (I can&#8217;t recall if this is even possible, and I sure don&#8217;t have time to re-learn IDDU nowadays.)</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: murrayinfosys</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/file-2/#comment-70097</link>
		<dc:creator>murrayinfosys</dc:creator>
		<pubDate>Fri, 06 Nov 2009 23:14:37 +0000</pubDate>
		<guid isPermaLink="false">#comment-70097</guid>
		<description><![CDATA[I&#039;ve used the methods described above - OPNQRY, RPG III and CPYF.

IMHO, IF the source is good at formatting the flat file, then this is the way to go. Simply copy the flat file to your DDS defined PF and run the program. If the source is not good at defining a flat file, for example, columns vary in length from run to run, I would use the OPNQRY method to format the flat file to a DDS defined PF. Yes, it takes a bit of OPNQRY knowledge, but it is quick and simple once you get the hang of it. Plus the program has not changed. Just front end changes. 

PS: The RPG III cycle is still there. You can do Matching Record (M1-&gt;M9) and Level processing (L1 -&gt; L9). I do not remember the C1 thru C9. AND, you can use Auto-Report, a very simple way to create a listing w/ totals and Sub-totals.]]></description>
		<content:encoded><![CDATA[<p>I&#8217;ve used the methods described above &#8211; OPNQRY, RPG III and CPYF.</p>
<p>IMHO, IF the source is good at formatting the flat file, then this is the way to go. Simply copy the flat file to your DDS defined PF and run the program. If the source is not good at defining a flat file, for example, columns vary in length from run to run, I would use the OPNQRY method to format the flat file to a DDS defined PF. Yes, it takes a bit of OPNQRY knowledge, but it is quick and simple once you get the hang of it. Plus the program has not changed. Just front end changes. </p>
<p>PS: The RPG III cycle is still there. You can do Matching Record (M1-&gt;M9) and Level processing (L1 -&gt; L9). I do not remember the C1 thru C9. AND, you can use Auto-Report, a very simple way to create a listing w/ totals and Sub-totals.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bigkat</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/file-2/#comment-70072</link>
		<dc:creator>bigkat</dc:creator>
		<pubDate>Fri, 06 Nov 2009 15:01:12 +0000</pubDate>
		<guid isPermaLink="false">#comment-70072</guid>
		<description><![CDATA[It should also be possible to do an OPNQRYF to define a field and key off of it.  I am no OPNQRYF magician, but I&#039;m sure some of them are around here and could help.

I would use embedded SQL to define a cursor that breaks out the data and orders it as needed.]]></description>
		<content:encoded><![CDATA[<p>It should also be possible to do an OPNQRYF to define a field and key off of it.  I am no OPNQRYF magician, but I&#8217;m sure some of them are around here and could help.</p>
<p>I would use embedded SQL to define a cursor that breaks out the data and orders it as needed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: philpl1jb</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/file-2/#comment-70060</link>
		<dc:creator>philpl1jb</dc:creator>
		<pubDate>Fri, 06 Nov 2009 12:14:36 +0000</pubDate>
		<guid isPermaLink="false">#comment-70060</guid>
		<description><![CDATA[Two routes have been proposed -- using an RPG III method that sets the F spec as P(rimary) and has I spec&#039;s ... I&#039;m old but I was playing with other stuff back then.

the other route is to use the dbf.  I typically build a pf with fields and keys and copy the flat file into the PF .. if the fielding isn&#039;t quite right I fix the description recomile the Pf and copy the data again.  this copy process and calling the rpg program to use the data is done by a  cl.  the pf with structure and keys is used by  the RPG program. 
Phil]]></description>
		<content:encoded><![CDATA[<p>Two routes have been proposed &#8212; using an RPG III method that sets the F spec as P(rimary) and has I spec&#8217;s &#8230; I&#8217;m old but I was playing with other stuff back then.</p>
<p>the other route is to use the dbf.  I typically build a pf with fields and keys and copy the flat file into the PF .. if the fielding isn&#8217;t quite right I fix the description recomile the Pf and copy the data again.  this copy process and calling the rpg program to use the data is done by a  cl.  the pf with structure and keys is used by  the RPG program.<br />
Phil</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: charliebrowne</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/file-2/#comment-70045</link>
		<dc:creator>charliebrowne</dc:creator>
		<pubDate>Thu, 05 Nov 2009 22:35:10 +0000</pubDate>
		<guid isPermaLink="false">#comment-70045</guid>
		<description><![CDATA[I think what Teandy is referencing is no longer available.
Early on in RPG (before RPGII) you could put a C1 --&gt; C9 on the I spec line for a field. THis allow you to do a chain.
Other options were M1 - M9 for Matching Record and L1 to L9 for Level breaks.
You can still use these two options but you must use the RPG cycle to have them work.]]></description>
		<content:encoded><![CDATA[<p>I think what Teandy is referencing is no longer available.<br />
Early on in RPG (before RPGII) you could put a C1 &#8211;&gt; C9 on the I spec line for a field. THis allow you to do a chain.<br />
Other options were M1 &#8211; M9 for Matching Record and L1 to L9 for Level breaks.<br />
You can still use these two options but you must use the RPG cycle to have them work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: teandy</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/file-2/#comment-70044</link>
		<dc:creator>teandy</dc:creator>
		<pubDate>Thu, 05 Nov 2009 21:40:08 +0000</pubDate>
		<guid isPermaLink="false">#comment-70044</guid>
		<description><![CDATA[Are you talking about a flat file with only one long field defined and part of that field is the key?  Or are you talking about a physical file with no key defined?

If it is the first one, there is a way to define the key inside your program.  It has been literally years since I have done this and I no longer have examples.  However, you should be able to Google on INTERNAL FILE SPECS or PROGRAM DESCRIBED FILES and find what you need.

This thread here may offer some insight:

http://archive.midrange.com/rpg400-l/200409/msg00354.html     

If this is the second type, then you can just create a keyed logical file over the physical, or you can use SQL or the OPNQRYF command to pull the data in the order you want.]]></description>
		<content:encoded><![CDATA[<p>Are you talking about a flat file with only one long field defined and part of that field is the key?  Or are you talking about a physical file with no key defined?</p>
<p>If it is the first one, there is a way to define the key inside your program.  It has been literally years since I have done this and I no longer have examples.  However, you should be able to Google on INTERNAL FILE SPECS or PROGRAM DESCRIBED FILES and find what you need.</p>
<p>This thread here may offer some insight:</p>
<p><a href="http://archive.midrange.com/rpg400-l/200409/msg00354.html" rel="nofollow">http://archive.midrange.com/rpg400-l/200409/msg00354.html</a>     </p>
<p>If this is the second type, then you can just create a keyed logical file over the physical, or you can use SQL or the OPNQRYF command to pull the data in the order you want.</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/8 queries in 0.037 seconds using memcached
Object Caching 353/354 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-18 15:17:23 -->