 




<?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: DB2/400 count physical file record</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/db2400-count-physical-file-record/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/db2400-count-physical-file-record/</link>
	<description></description>
	<lastBuildDate>Fri, 24 May 2013 07:13:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: The Most-Watched IT Questions: December 13, 2011 - ITKE Community Blog</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/db2400-count-physical-file-record/#comment-100177</link>
		<dc:creator>The Most-Watched IT Questions: December 13, 2011 - ITKE Community Blog</dc:creator>
		<pubDate>Tue, 13 Dec 2011 15:41:17 +0000</pubDate>
		<guid isPermaLink="false">#comment-100177</guid>
		<description><![CDATA[[...] Users help count files in DB2, but complain about the absence of reality in the basic question. Are they tackling the right [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Users help count files in DB2, but complain about the absence of reality in the basic question. Are they tackling the right [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yorkshireman</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/db2400-count-physical-file-record/#comment-100035</link>
		<dc:creator>yorkshireman</dc:creator>
		<pubDate>Fri, 09 Dec 2011 16:28:32 +0000</pubDate>
		<guid isPermaLink="false">#comment-100035</guid>
		<description><![CDATA[Phil

Sorry - not the intended interpretation.   I think I was (trying to be) sardonic, or ironic, or one of those type of things.   Doesn&#039;t come across well in hurried print.   


We seem to agree on the absence of reality in the whole thread.  of course there *may* be good reasons to do all kinds of stuff, but a simple enquiry for number of records is best met with the tools that the system has.  


Still, onward to better things...


.]]></description>
		<content:encoded><![CDATA[<p>Phil</p>
<p>Sorry &#8211; not the intended interpretation.   I think I was (trying to be) sardonic, or ironic, or one of those type of things.   Doesn&#8217;t come across well in hurried print.   </p>
<p>We seem to agree on the absence of reality in the whole thread.  of course there *may* be good reasons to do all kinds of stuff, but a simple enquiry for number of records is best met with the tools that the system has.  </p>
<p>Still, onward to better things&#8230;</p>
<p>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: philpl1jb</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/db2400-count-physical-file-record/#comment-99972</link>
		<dc:creator>philpl1jb</dc:creator>
		<pubDate>Thu, 08 Dec 2011 16:12:40 +0000</pubDate>
		<guid isPermaLink="false">#comment-99972</guid>
		<description><![CDATA[Yorkshireman,

Not my choice.  
This was the choice of the person asking the question and writing the program.  
if the program is going to do more processing with that file/member it make sense.

Phil]]></description>
		<content:encoded><![CDATA[<p>Yorkshireman,</p>
<p>Not my choice.<br />
This was the choice of the person asking the question and writing the program.<br />
if the program is going to do more processing with that file/member it make sense.</p>
<p>Phil</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yorkshireman</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/db2400-count-physical-file-record/#comment-99970</link>
		<dc:creator>yorkshireman</dc:creator>
		<pubDate>Thu, 08 Dec 2011 16:01:51 +0000</pubDate>
		<guid isPermaLink="false">#comment-99970</guid>
		<description><![CDATA[Phil - that&#039;s getting advanced - USROPN indeed!

I still have a problem knowing why you would possibly want to use RPG, and incur the overhead of the Database opening a file when a rtvobjd does the job - even if you called it from within rpg, it must surely be less  resource intensive.. 

Ah well - not my concern..



.]]></description>
		<content:encoded><![CDATA[<p>Phil &#8211; that&#8217;s getting advanced &#8211; USROPN indeed!</p>
<p>I still have a problem knowing why you would possibly want to use RPG, and incur the overhead of the Database opening a file when a rtvobjd does the job &#8211; even if you called it from within rpg, it must surely be less  resource intensive.. </p>
<p>Ah well &#8211; not my concern..</p>
<p>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pdsathishkumar</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/db2400-count-physical-file-record/#comment-99950</link>
		<dc:creator>pdsathishkumar</dc:creator>
		<pubDate>Thu, 08 Dec 2011 08:37:44 +0000</pubDate>
		<guid isPermaLink="false">#comment-99950</guid>
		<description><![CDATA[i got the answer to count number of records in physical file member.... using file information data structure...

 Femp1      if   e           k disk    usropn extmbr(E1)
 F                                     infds(aaa)       
 DE1               s              5a   inz(&#039;EMP12&#039;)  ---&gt;pf member name   
 Daaa              ds                                   
 Drecordno               156    159b 0                  
 C                   open      emp1                     
 C     recordno      dsply                              
 C                   close     emp1                     
 C                   eval      *inlr = *on]]></description>
		<content:encoded><![CDATA[<p>i got the answer to count number of records in physical file member&#8230;. using file information data structure&#8230;</p>
<p> Femp1      if   e           k disk    usropn extmbr(E1)<br />
 F                                     infds(aaa)<br />
 DE1               s              5a   inz(&#8216;EMP12&#8242;)  &#8212;&gt;pf member name<br />
 Daaa              ds<br />
 Drecordno               156    159b 0<br />
 C                   open      emp1<br />
 C     recordno      dsply<br />
 C                   close     emp1<br />
 C                   eval      *inlr = *on</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: philpl1jb</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/db2400-count-physical-file-record/#comment-99917</link>
		<dc:creator>philpl1jb</dc:creator>
		<pubDate>Wed, 07 Dec 2011 17:34:09 +0000</pubDate>
		<guid isPermaLink="false">#comment-99917</guid>
		<description><![CDATA[If the file onlly has one member this is trival.

A few changes to your program are requested to get the number of records in a member.
1.  F spec keyword USROPN  .. file will not open until you request it
2.  F spec keyword EXTMBR( MBRNAME&#039;) identifies specific member to use
3.  D spec
     D MBRNAME             10   INZ( &#039;MYMEM&#039;  ) &lt;-- this should be the member neame
4. C spec    Open filename &lt;-- this should be the file name
5. then you can use the binary field thats in the IFSDS to get the number of records in the member.

Phil]]></description>
		<content:encoded><![CDATA[<p>If the file onlly has one member this is trival.</p>
<p>A few changes to your program are requested to get the number of records in a member.<br />
1.  F spec keyword USROPN  .. file will not open until you request it<br />
2.  F spec keyword EXTMBR( MBRNAME&#8217;) identifies specific member to use<br />
3.  D spec<br />
     D MBRNAME             10   INZ( &#8216;MYMEM&#8217;  ) &lt;&#8211; this should be the member neame<br />
4. C spec    Open filename &lt;&#8211; this should be the file name<br />
5. then you can use the binary field thats in the IFSDS to get the number of records in the member.</p>
<p>Phil</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yorkshireman</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/db2400-count-physical-file-record/#comment-99913</link>
		<dc:creator>yorkshireman</dc:creator>
		<pubDate>Wed, 07 Dec 2011 16:46:35 +0000</pubDate>
		<guid isPermaLink="false">#comment-99913</guid>
		<description><![CDATA[&gt;&gt;No… i want to count number of record in PF file member using RPG only…. 
&gt;&gt;i don’t want in cl…

Well, if you&#039;rre determined, you need an RPG program which has

Open file 
loop:
read record
If last record, exit 
else
add 1 to count 

go to loop


It&#039;s pretty much the same in any language - only the syntax differs.  Some languages make it more opaque than others.  
IBM i and its rich instruction set gives you more choice than other machines.


Oh - in case the file has a hundred million records or so - common on this box - it&#039;s still quicker to ask the operating system - it KNOWS what records are in a file - that&#039;s its job - that&#039;s what we bought it for. 


&#039;A million dollars of computer and you have to add up the records in a file.... &#039;




.]]></description>
		<content:encoded><![CDATA[<p>&gt;&gt;No… i want to count number of record in PF file member using RPG only….<br />
&gt;&gt;i don’t want in cl…</p>
<p>Well, if you&#8217;rre determined, you need an RPG program which has</p>
<p>Open file<br />
loop:<br />
read record<br />
If last record, exit<br />
else<br />
add 1 to count </p>
<p>go to loop</p>
<p>It&#8217;s pretty much the same in any language &#8211; only the syntax differs.  Some languages make it more opaque than others.<br />
IBM i and its rich instruction set gives you more choice than other machines.</p>
<p>Oh &#8211; in case the file has a hundred million records or so &#8211; common on this box &#8211; it&#8217;s still quicker to ask the operating system &#8211; it KNOWS what records are in a file &#8211; that&#8217;s its job &#8211; that&#8217;s what we bought it for. </p>
<p>&#8216;A million dollars of computer and you have to add up the records in a file&#8230;. &#8216;</p>
<p>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: teandy</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/db2400-count-physical-file-record/#comment-99906</link>
		<dc:creator>teandy</dc:creator>
		<pubDate>Wed, 07 Dec 2011 16:00:31 +0000</pubDate>
		<guid isPermaLink="false">#comment-99906</guid>
		<description><![CDATA[&lt;i&gt;No… i want to count number of record in PF file member using RPG only…. i don’t want in cl…
&lt;/i&gt;
Then you need to use either the INFDS, read the file member and count the records or look into using an API like QCMDEXC, QCAPCMD or QUSRMBRD.]]></description>
		<content:encoded><![CDATA[<p><i>No… i want to count number of record in PF file member using RPG only…. i don’t want in cl…<br />
</i><br />
Then you need to use either the INFDS, read the file member and count the records or look into using an API like QCMDEXC, QCAPCMD or QUSRMBRD.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pdsathishkumar</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/db2400-count-physical-file-record/#comment-99899</link>
		<dc:creator>pdsathishkumar</dc:creator>
		<pubDate>Wed, 07 Dec 2011 10:26:13 +0000</pubDate>
		<guid isPermaLink="false">#comment-99899</guid>
		<description><![CDATA[No... i want to count number of record in PF file member using RPG only.... i don&#039;t want in cl...]]></description>
		<content:encoded><![CDATA[<p>No&#8230; i want to count number of record in PF file member using RPG only&#8230;. i don&#8217;t want in cl&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/db2400-count-physical-file-record/#comment-99887</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Wed, 07 Dec 2011 01:05:59 +0000</pubDate>
		<guid isPermaLink="false">#comment-99887</guid>
		<description><![CDATA[&lt;i&gt;now i got little confusion...&lt;/i&gt;

You don&#039;t need to be concerned about it for this thread. Yorkshireman is right.

But for anyone who reads information like this in the future, it should always be clear that there are differences between files and members of files. This thread is going to be around for a long time. It needs to be noted that a direct RTVMBRD command will not always give the complete answer if the question is &quot;How many records are in this file?&quot; The RTVMBRD command is &#039;Retrieve Member Description&#039; and it retrieves information about a &quot;member&quot; of a file, not about a &quot;file&quot;.

Eventually, that will be important to you. But not today.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>now i got little confusion&#8230;</i></p>
<p>You don&#8217;t need to be concerned about it for this thread. Yorkshireman is right.</p>
<p>But for anyone who reads information like this in the future, it should always be clear that there are differences between files and members of files. This thread is going to be around for a long time. It needs to be noted that a direct RTVMBRD command will not always give the complete answer if the question is &#8220;How many records are in this file?&#8221; The RTVMBRD command is &#8216;Retrieve Member Description&#8217; and it retrieves information about a &#8220;member&#8221; of a file, not about a &#8220;file&#8221;.</p>
<p>Eventually, that will be important to you. But not today.</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.020 seconds using memcached
Object Caching 395/396 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-24 09:18:01 -->