<?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: How do I find out how many lines of source code are on the system?</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/how-do-i-find-out-how-many-lines-of-source-code-are-on-the-system/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/how-do-i-find-out-how-many-lines-of-source-code-are-on-the-system/</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: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-do-i-find-out-how-many-lines-of-source-code-are-on-the-system/#comment-91396</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Tue, 26 Apr 2011 19:22:10 +0000</pubDate>
		<guid isPermaLink="false">#comment-91396</guid>
		<description><![CDATA[&lt;i&gt;You can take each file in that list and run the DSPFD command with *MBRLIST to an outfile.&lt;/i&gt;

True, but the total solution only requires two statements:&lt;pre&gt;
DSPFD FILE(*ALLUSR/*ALL) TYPE(*MBR) OUTPUT(*OUTFILE) FILEATR(*PF) OUTFILE(QTEMP/ALLMBR)
SELECT sum(MBNRCD) FROM QTEMP/ALLMBR WHERE MBDTAT =&#039;S&#039;&lt;/pre&gt;
There&#039;s no need to run through the list to run DSPFD for each individual source file. All of the values already exist in the results from the single DSPFD command. Just add up the ones that matter.

At least two considerations could apply. A very large number of data files could combine either with a requirement for absolute minimum space used or time consumed. If temporary space or time requirement demands it, then your direction is probably best.

But if the question is &quot;easiest&quot;, it&#039;s hard to improve on two statements.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>You can take each file in that list and run the DSPFD command with *MBRLIST to an outfile.</i></p>
<p>True, but the total solution only requires two statements:
<pre>
DSPFD FILE(*ALLUSR/*ALL) TYPE(*MBR) OUTPUT(*OUTFILE) FILEATR(*PF) OUTFILE(QTEMP/ALLMBR)
SELECT sum(MBNRCD) FROM QTEMP/ALLMBR WHERE MBDTAT ='S'</pre>
<p>There&#8217;s no need to run through the list to run DSPFD for each individual source file. All of the values already exist in the results from the single DSPFD command. Just add up the ones that matter.</p>
<p>At least two considerations could apply. A very large number of data files could combine either with a requirement for absolute minimum space used or time consumed. If temporary space or time requirement demands it, then your direction is probably best.</p>
<p>But if the question is &#8220;easiest&#8221;, it&#8217;s hard to improve on two statements.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vatchy</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-do-i-find-out-how-many-lines-of-source-code-are-on-the-system/#comment-91385</link>
		<dc:creator>vatchy</dc:creator>
		<pubDate>Tue, 26 Apr 2011 17:36:13 +0000</pubDate>
		<guid isPermaLink="false">#comment-91385</guid>
		<description><![CDATA[&lt;i&gt;Can you describe how that’s an easier starting point?&lt;/i&gt;

It&#039;s easier because you are starting with a list of the source files.  You can take each file in that list and run the DSPFD command with *MBRLIST to an outfile.  After doing that for each source file you can then total the number of records and you&#039;re done.  Seems pretty simple to me.]]></description>
		<content:encoded><![CDATA[<p><i>Can you describe how that’s an easier starting point?</i></p>
<p>It&#8217;s easier because you are starting with a list of the source files.  You can take each file in that list and run the DSPFD command with *MBRLIST to an outfile.  After doing that for each source file you can then total the number of records and you&#8217;re done.  Seems pretty simple to me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-do-i-find-out-how-many-lines-of-source-code-are-on-the-system/#comment-91331</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Mon, 25 Apr 2011 23:59:46 +0000</pubDate>
		<guid isPermaLink="false">#comment-91331</guid>
		<description><![CDATA[&lt;i&gt;There is an easier starting point.&lt;/i&gt;

Can you describe how that&#039;s an easier starting point?

First, QADBXREF is an internal DB2 system file that shouldn&#039;t be directly accessed. It&#039;s unlikely that a problem would come from it, but it&#039;s always better to access system objects through supplied interfaces. You can run DSPDBR over QADBXREF to see all of the LFs that are supplied by IBM if it&#039;s necessary to read records from QADBXREF.

Next, processing rows of QADBXREF may take a long time on some systems. Processing requires creating lists of members in each &#039;S&#039;ource file found. Depending on locks, on authorities and on how many members are in any of the source files, it may take a significant amount of time to list a files members. If DB2 is updating QADBXREF due to file creations/deletions in other jobs, you don&#039;t want to be accessing it at the same time. Interference with DB2 can be a cause of problems that lead to a need to run RCLSTG SELECT(*DBXREF).

Note that the processing of members is what DSPFD TYPE(*MBR) supplies without needing a second step for each row with DBXTYP=&#039;S&#039;.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>There is an easier starting point.</i></p>
<p>Can you describe how that&#8217;s an easier starting point?</p>
<p>First, QADBXREF is an internal DB2 system file that shouldn&#8217;t be directly accessed. It&#8217;s unlikely that a problem would come from it, but it&#8217;s always better to access system objects through supplied interfaces. You can run DSPDBR over QADBXREF to see all of the LFs that are supplied by IBM if it&#8217;s necessary to read records from QADBXREF.</p>
<p>Next, processing rows of QADBXREF may take a long time on some systems. Processing requires creating lists of members in each &#8216;S&#8217;ource file found. Depending on locks, on authorities and on how many members are in any of the source files, it may take a significant amount of time to list a files members. If DB2 is updating QADBXREF due to file creations/deletions in other jobs, you don&#8217;t want to be accessing it at the same time. Interference with DB2 can be a cause of problems that lead to a need to run RCLSTG SELECT(*DBXREF).</p>
<p>Note that the processing of members is what DSPFD TYPE(*MBR) supplies without needing a second step for each row with DBXTYP=&#8217;S&#8217;.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vatchy</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-do-i-find-out-how-many-lines-of-source-code-are-on-the-system/#comment-91266</link>
		<dc:creator>vatchy</dc:creator>
		<pubDate>Sat, 23 Apr 2011 12:38:06 +0000</pubDate>
		<guid isPermaLink="false">#comment-91266</guid>
		<description><![CDATA[There is an easier starting point.  File QADBXREF in library QSYS contains a list of all of the files on the system.  Read through that file and look for DBXTYP = &quot;S&quot; - that identifies the source files on the system.]]></description>
		<content:encoded><![CDATA[<p>There is an easier starting point.  File QADBXREF in library QSYS contains a list of all of the files on the system.  Read through that file and look for DBXTYP = &#8220;S&#8221; &#8211; that identifies the source files on the system.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gilly400</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-do-i-find-out-how-many-lines-of-source-code-are-on-the-system/#comment-52956</link>
		<dc:creator>gilly400</dc:creator>
		<pubDate>Tue, 29 Apr 2008 11:57:29 +0000</pubDate>
		<guid isPermaLink="false">#comment-52956</guid>
		<description><![CDATA[Hi,

You can of course use query to give you level breaks with totals for each source file and/or library.

Regards,

Martin Gilbert.]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>You can of course use query to give you level breaks with totals for each source file and/or library.</p>
<p>Regards,</p>
<p>Martin Gilbert.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gilly400</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-do-i-find-out-how-many-lines-of-source-code-are-on-the-system/#comment-52955</link>
		<dc:creator>gilly400</dc:creator>
		<pubDate>Tue, 29 Apr 2008 11:52:36 +0000</pubDate>
		<guid isPermaLink="false">#comment-52955</guid>
		<description><![CDATA[Hi,

There is an easier way :-

DSPFD FILE(*ALLUSR/*ALL) TYP(*MBR) OUTPUT(*OUTFILE) FILEATR(*PF) OUTFILE(yourlib/yourfile)

Then use Query to select records with MBDTAT (File Type) = &#039;S&#039; and give a total of MBNRCD (Current number of records).

Regards,

Martin Gilbert.]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>There is an easier way :-</p>
<p>DSPFD FILE(*ALLUSR/*ALL) TYP(*MBR) OUTPUT(*OUTFILE) FILEATR(*PF) OUTFILE(yourlib/yourfile)</p>
<p>Then use Query to select records with MBDTAT (File Type) = &#8216;S&#8217; and give a total of MBNRCD (Current number of records).</p>
<p>Regards,</p>
<p>Martin Gilbert.</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.035 seconds using memcached
Object Caching 337/343 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-06-18 23:11:05 -->