 




<?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: AS400 comparing large database files, cobol code taking too long</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/as400-comparing-large-database-files-cobol-code-taking-too-long/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-comparing-large-database-files-cobol-code-taking-too-long/</link>
	<description></description>
	<lastBuildDate>Fri, 24 May 2013 01:03:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: The Most-Watched IT Questions: September 20, 2011 - ITKE Community Blog</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-comparing-large-database-files-cobol-code-taking-too-long/#comment-96803</link>
		<dc:creator>The Most-Watched IT Questions: September 20, 2011 - ITKE Community Blog</dc:creator>
		<pubDate>Tue, 20 Sep 2011 06:41:44 +0000</pubDate>
		<guid isPermaLink="false">#comment-96803</guid>
		<description><![CDATA[[...] 2. Yorkshireman, CharlieBrowne, and TomLiotta try to get to the bottom of why COBOL code is taking too long while AS/400 comparing large database files. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] 2. Yorkshireman, CharlieBrowne, and TomLiotta try to get to the bottom of why COBOL code is taking too long while AS/400 comparing large database files. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Most-Watched IT Questions: September 13, 2011 - ITKE Community Blog</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-comparing-large-database-files-cobol-code-taking-too-long/#comment-96491</link>
		<dc:creator>The Most-Watched IT Questions: September 13, 2011 - ITKE Community Blog</dc:creator>
		<pubDate>Tue, 13 Sep 2011 06:16:45 +0000</pubDate>
		<guid isPermaLink="false">#comment-96491</guid>
		<description><![CDATA[[...] 1. Yorkshireman, CharlieBrowne, Philpl1jb, and TomLiotta helped a member whose COBOL code is taking too long while AS/400 compares large database files. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] 1. Yorkshireman, CharlieBrowne, Philpl1jb, and TomLiotta helped a member whose COBOL code is taking too long while AS/400 compares large database files. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yorkshireman</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-comparing-large-database-files-cobol-code-taking-too-long/#comment-96443</link>
		<dc:creator>yorkshireman</dc:creator>
		<pubDate>Mon, 12 Sep 2011 09:50:28 +0000</pubDate>
		<guid isPermaLink="false">#comment-96443</guid>
		<description><![CDATA[But you shouldn’t call it an “audit” file. It’s an application file like all the others

Tom&#039;s correct of course, but recording system activity within an application is a common enough solution that &#039;audit file&#039; generally implies this kind of approach.  A well designed application will have it secured in an appropriate manner against interference - so, as you say, probably many will not. 

My preferred solution would be to use the system journal as the source of information about changes.   It is guaranteed to be complete, you have it running anyway (you *do* have these files journalled?) and it&#039;s quick.  If your auditors need something on a tape somewhere then you could rewrite the journal entries to an audit file (application data, Tom)   and secure it to a suitable user group profile.

Any number of ways of cracking this particular nut.  What&#039;s important - speed (your start point) - efficiency (=  future costs)  simplicity (= reduced maintenance costs) - security (= regulatory costs)  

bonne chance !]]></description>
		<content:encoded><![CDATA[<p>But you shouldn’t call it an “audit” file. It’s an application file like all the others</p>
<p>Tom&#8217;s correct of course, but recording system activity within an application is a common enough solution that &#8216;audit file&#8217; generally implies this kind of approach.  A well designed application will have it secured in an appropriate manner against interference &#8211; so, as you say, probably many will not. </p>
<p>My preferred solution would be to use the system journal as the source of information about changes.   It is guaranteed to be complete, you have it running anyway (you *do* have these files journalled?) and it&#8217;s quick.  If your auditors need something on a tape somewhere then you could rewrite the journal entries to an audit file (application data, Tom)   and secure it to a suitable user group profile.</p>
<p>Any number of ways of cracking this particular nut.  What&#8217;s important &#8211; speed (your start point) &#8211; efficiency (=  future costs)  simplicity (= reduced maintenance costs) &#8211; security (= regulatory costs)  </p>
<p>bonne chance !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-comparing-large-database-files-cobol-code-taking-too-long/#comment-96310</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Thu, 08 Sep 2011 22:15:59 +0000</pubDate>
		<guid isPermaLink="false">#comment-96310</guid>
		<description><![CDATA[&lt;i&gt;Your audit file will be up to date...&lt;/i&gt;

But you shouldn&#039;t call it an &quot;audit&quot; file. It&#039;s an application file like all the others. It&#039;s subject to the same DFU or SQL or other modifications as any database file, so it&#039;s inappropriate for audits.

Of course, you could journal the &#039;audit&#039; file, but that just adds an additional layer.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>Your audit file will be up to date&#8230;</i></p>
<p>But you shouldn&#8217;t call it an &#8220;audit&#8221; file. It&#8217;s an application file like all the others. It&#8217;s subject to the same DFU or SQL or other modifications as any database file, so it&#8217;s inappropriate for audits.</p>
<p>Of course, you could journal the &#8216;audit&#8217; file, but that just adds an additional layer.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yorkshireman</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-comparing-large-database-files-cobol-code-taking-too-long/#comment-96292</link>
		<dc:creator>yorkshireman</dc:creator>
		<pubDate>Thu, 08 Sep 2011 12:56:20 +0000</pubDate>
		<guid isPermaLink="false">#comment-96292</guid>
		<description><![CDATA[By using triggers you are efectively spreading the processing around the system to the point of origin.  In overall terms it will consume more resource, but by adding a couple of milliseconds at each change point, you - and users - won&#039;t notice it.  
Your audit file will be up to date, all the time, and a simple display via change time woudl enable a &#039;real time plus milliseconds&#039; view.  

If you haven&#039;t written a trigger program then a quick net search will bring up lots of code examles, into which all you need do is substiture your origin file and add your audit file, and it will be working.   

As an alternative, you could write a journal extractor - as each journal is detached, a function reads the entries and sifts out the ones relevant to the file under study.  You have the choice of writing something to an audit file, or merely making the extracted journal entries your audit - that&#039;s what a journal does, after all.   If you journalled this file to its own journal you would retain the functionality of a system journal - accurate, comprehensive, timely, and have the audit trail you need - just save the journal receiver to tape and place it, day by day or whatever, into your audit log filing cabinet.  


- No programming needed !   All your batch time released - Guaranteed accurate !]]></description>
		<content:encoded><![CDATA[<p>By using triggers you are efectively spreading the processing around the system to the point of origin.  In overall terms it will consume more resource, but by adding a couple of milliseconds at each change point, you &#8211; and users &#8211; won&#8217;t notice it.<br />
Your audit file will be up to date, all the time, and a simple display via change time woudl enable a &#8216;real time plus milliseconds&#8217; view.  </p>
<p>If you haven&#8217;t written a trigger program then a quick net search will bring up lots of code examles, into which all you need do is substiture your origin file and add your audit file, and it will be working.   </p>
<p>As an alternative, you could write a journal extractor &#8211; as each journal is detached, a function reads the entries and sifts out the ones relevant to the file under study.  You have the choice of writing something to an audit file, or merely making the extracted journal entries your audit &#8211; that&#8217;s what a journal does, after all.   If you journalled this file to its own journal you would retain the functionality of a system journal &#8211; accurate, comprehensive, timely, and have the audit trail you need &#8211; just save the journal receiver to tape and place it, day by day or whatever, into your audit log filing cabinet.  </p>
<p>- No programming needed !   All your batch time released &#8211; Guaranteed accurate !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-comparing-large-database-files-cobol-code-taking-too-long/#comment-96252</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Wed, 07 Sep 2011 06:50:06 +0000</pubDate>
		<guid isPermaLink="false">#comment-96252</guid>
		<description><![CDATA[If it can be stated in an SQL statement, it&#039;s almost guaranteed that SQL will be faster. Any HLL is going to be calling into DB2 routines for every individual I/O statement and then coming back up into program code until the next I/O. A single SQL statement will basically only make a single call into DB2 routines and stay in there.

But if you want to track adds/changes/deletes, journaling will be far faster than alternatives.

Tom]]></description>
		<content:encoded><![CDATA[<p>If it can be stated in an SQL statement, it&#8217;s almost guaranteed that SQL will be faster. Any HLL is going to be calling into DB2 routines for every individual I/O statement and then coming back up into program code until the next I/O. A single SQL statement will basically only make a single call into DB2 routines and stay in there.</p>
<p>But if you want to track adds/changes/deletes, journaling will be far faster than alternatives.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: artzone</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-comparing-large-database-files-cobol-code-taking-too-long/#comment-96219</link>
		<dc:creator>artzone</dc:creator>
		<pubDate>Tue, 06 Sep 2011 17:29:35 +0000</pubDate>
		<guid isPermaLink="false">#comment-96219</guid>
		<description><![CDATA[Thanks everyone for all the sugestions... I will try out an SQL tomorrow and see how it goes... and update this discussion]]></description>
		<content:encoded><![CDATA[<p>Thanks everyone for all the sugestions&#8230; I will try out an SQL tomorrow and see how it goes&#8230; and update this discussion</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: philpl1jb</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-comparing-large-database-files-cobol-code-taking-too-long/#comment-96217</link>
		<dc:creator>philpl1jb</dc:creator>
		<pubDate>Tue, 06 Sep 2011 15:59:30 +0000</pubDate>
		<guid isPermaLink="false">#comment-96217</guid>
		<description><![CDATA[Good question ARTZONE

YorkShireMan has an excellent approach using Triggers.  

The trigger program is called by the system when there is an update/delete/add to the file by any means.  It is called in &quot;real&quot; time as the events occur.

This trigger program could write directly to the audit file.  It receives the before and after image of the record for an update, before image for a delete, after image for an add,.  Program/user/job date &amp; time of change.
Phil]]></description>
		<content:encoded><![CDATA[<p>Good question ARTZONE</p>
<p>YorkShireMan has an excellent approach using Triggers.  </p>
<p>The trigger program is called by the system when there is an update/delete/add to the file by any means.  It is called in &#8220;real&#8221; time as the events occur.</p>
<p>This trigger program could write directly to the audit file.  It receives the before and after image of the record for an update, before image for a delete, after image for an add,.  Program/user/job date &amp; time of change.<br />
Phil</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: charliebrowne</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-comparing-large-database-files-cobol-code-taking-too-long/#comment-96213</link>
		<dc:creator>charliebrowne</dc:creator>
		<pubDate>Tue, 06 Sep 2011 15:08:23 +0000</pubDate>
		<guid isPermaLink="false">#comment-96213</guid>
		<description><![CDATA[If you put the SQL  statment in a source member, you can then just use the RUNSQLSTM command and you do not have to do any coding.
If you need to do multiple SQL statements, you can put them all in the same source member. Just add a semi-colon at the end of each statement.]]></description>
		<content:encoded><![CDATA[<p>If you put the SQL  statment in a source member, you can then just use the RUNSQLSTM command and you do not have to do any coding.<br />
If you need to do multiple SQL statements, you can put them all in the same source member. Just add a semi-colon at the end of each statement.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: charliebrowne</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-comparing-large-database-files-cobol-code-taking-too-long/#comment-96212</link>
		<dc:creator>charliebrowne</dc:creator>
		<pubDate>Tue, 06 Sep 2011 15:05:07 +0000</pubDate>
		<guid isPermaLink="false">#comment-96212</guid>
		<description><![CDATA[I beleive the best way would be to use SQL.
Use the the NOT EXISTS option
Here is a sample of one of mine.
&lt;pre&gt;
INSERT INTO  WRKENCRPT/DELPF                                       
  (SYS, PRN, AGT, ACCTNO, CLIENT, STRTDAT, ENDDAT, CHGDAT, USRPRF) 
SELECT SYS, PRN, AGT, ACCTNO, CLIENT, STRTDAT,                     
       CURDATE(), CHGDAT, USRPRF                                   
  FROM ICULIB/ACCTMSTR A                                           
  WHERE CLIENT &lt;&gt; &#039;1379&#039; AND                                       
    NOT EXISTS (SELECT * FROM                                      
WRKENCRPT/ACCTMSTR B WHERE A.ACCTNO = B.ACCTNO AND                 
    A.SYS = B.SYS AND A.PRN = B.PRN AND A.AGT = B.AGT)&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p>I beleive the best way would be to use SQL.<br />
Use the the NOT EXISTS option<br />
Here is a sample of one of mine.</p>
<pre>
INSERT INTO  WRKENCRPT/DELPF                                       
  (SYS, PRN, AGT, ACCTNO, CLIENT, STRTDAT, ENDDAT, CHGDAT, USRPRF) 
SELECT SYS, PRN, AGT, ACCTNO, CLIENT, STRTDAT,                     
       CURDATE(), CHGDAT, USRPRF                                   
  FROM ICULIB/ACCTMSTR A                                           
  WHERE CLIENT &lt;&gt; '1379' AND                                       
    NOT EXISTS (SELECT * FROM                                      
WRKENCRPT/ACCTMSTR B WHERE A.ACCTNO = B.ACCTNO AND                 
    A.SYS = B.SYS AND A.PRN = B.PRN AND A.AGT = B.AGT)</pre>
]]></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.014 seconds using memcached
Object Caching 395/396 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-24 02:05:48 -->