 




<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>IT Answers &#187; RPG Record Locks</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/tag/rpg-record-locks/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers</link>
	<description></description>
	<lastBuildDate>Wed, 22 May 2013 14:27:36 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Strange problem with locking of records</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/strange-problem-with-locking-of-records/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/strange-problem-with-locking-of-records/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 14:45:33 +0000</pubDate>
		<dc:creator>Varun123</dc:creator>
				<category><![CDATA[AS/400]]></category>
		<category><![CDATA[iSeries]]></category>
		<category><![CDATA[Record lock]]></category>
		<category><![CDATA[RPG Record Locks]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Hi All, My program reads many records one by one, and will update the  OLD KEY with NEW KEY in more than 100 files. If any run-time error/record locking the pgm will roll back the partial updates and continue with the next record. So, example take 5 records&#8230; in which I locked the 3rd record [...]]]></description>
				<content:encoded><![CDATA[<p>Hi All,</p>
<p>My program reads many records one by one, and will update the  OLD KEY with NEW KEY in more than 100 files. If any run-time error/record<br />
locking the pgm will roll back the partial updates and continue with the<br />
next record.</p>
<p>So, example take 5 records&#8230; in which I locked the 3rd record in<br />
another session. So, I&#8217;m expecting the rest 4 should go through and the<br />
3rd will be rolledback.</p>
<p>Main Batch File<br />
===========<br />
Acc1  AAA . . .. </p>
<p>Acc2  BBB &#8230;  ..<br />
Acc3  CCC .. .. .<br />
Acc4  DDD .. .<br />
Acc5  EEE &#8230;. </p>
<p>#File1 for update<br />
===========<br />
Acc3  A1  B1&#8230;<br />
Acc3  A2  B2&#8230;.<br />
Acc3  A3  B3&#8230;.</p>
<p>This file is not having any records belong to Acc1, Acc2, Acc4 &#038; Acc5.</p>
<p><b>My Program</b><br />
OLD_KEY  SETLL    #File1<br />
OLD_KEY  READE   #File1<br />
LOOP<br />
UPDATE  NEW_KEY in #File1<br />
OLD_KEY  READE   #File1<br />
ENDLOOP</p>
<p>When the program is executing first record Acc1 (and there is no such related record in #File1)<br />
When it encounters the READ/READE of #File1 &gt;&gt; *PSSR will catch it and error will be &#8220;RECORD 77888 IN USE BY SESSION&#8221;<br />
I wonder because, RRN 77888 record belongs to Acc3 but not Acc1 &#8230;..</p>
<p><b>Summary: </b><br />
I really locked the RRN 12345, and my program is executing some other record&#8230; and the *PSSR catches the error as &#8220;RECORD 12345 IS IN USE BY XXXXXX&#8221;&#8230;. this is happening when I use SETLL + READ/READE&#8230; Instead if I used CHAIN as a work around.. and its working fine&#8221; but for me I want to know why READ/READE is not supporting, as I cannot modify the code for many programs&#8230;.!</p>
<p><b>Work around Code is:</b><br />
OLD_KEY  CHAIN   #File1<br />
LOOP</p>
<p>UPDATE  NEW_KEY in #File1<br />
OLD_KEY  CHAIN   #File1</p>
<p>ENDLOOP</p>
<p>(CHAIN LOOP will not go to infinite loop, as the OLD_KEY will be updated to NEW_KEY for every read)</p>
<p>For record locking, I created a dummy pgm to lock it, and also using SQL locking some times&#8230;. This problem I have seen in both types of test locking&#8230;. </p>
<p>I need the reason of this strange behaviour, and also better solution rather than modifying many lines of code.</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/strange-problem-with-locking-of-records/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Record Locking in SQLRPGLE</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/record-locking-in-sqlrpgle/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/record-locking-in-sqlrpgle/#comments</comments>
		<pubDate>Thu, 23 Jun 2011 12:35:07 +0000</pubDate>
		<dc:creator>Varun123</dc:creator>
				<category><![CDATA[AS/400 Records]]></category>
		<category><![CDATA[Record lock]]></category>
		<category><![CDATA[RPG Record Locks]]></category>
		<category><![CDATA[SQLRPGLE]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Hi All I have a SQLILE pgm which updates files through SQL statements. How to get the user id/job number which is locking the PF record through the program&#8230; if any data structure supports, whats the position of it&#8230; -Varun]]></description>
				<content:encoded><![CDATA[<p>Hi All</p>
<p>I have a SQLILE pgm which updates files through SQL statements.<br />
How to get the user id/job number which is locking the PF record through the program&#8230; if any data structure supports, whats the position of it&#8230; </p>
<p>-Varun</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/record-locking-in-sqlrpgle/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Record locking in iSeries</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/record-locking-3/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/record-locking-3/#comments</comments>
		<pubDate>Tue, 14 Jun 2011 07:38:17 +0000</pubDate>
		<dc:creator>Kar</dc:creator>
				<category><![CDATA[AS/400]]></category>
		<category><![CDATA[AS/400 Records]]></category>
		<category><![CDATA[Record lock]]></category>
		<category><![CDATA[RPG Record Locks]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[My program takes the input as file, and process those records one by one. Here I would like to add the commitment control, if any one record fails then roll back and continue with the next record. To test this, I need to lock the record in another session and to run the program to [...]]]></description>
				<content:encoded><![CDATA[<p>My program takes the input as file, and process those records one by one. Here I would like to add the commitment control, if any one record fails then roll back and continue with the next record. To test this, I need to lock the record in another session and to run the program to check the ROLBK. How to lock the record? I tried with UPDDTA and its not locking the record. So now I have written a record locking program to lock the required record when testing. Is there any other way to lock the specific record?<br/><br/></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/record-locking-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>AS400 &#8211; File</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-file-3/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/as400-file-3/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 14:05:10 +0000</pubDate>
		<dc:creator>rajeshece</dc:creator>
				<category><![CDATA[AS/400 Records]]></category>
		<category><![CDATA[AS400- File]]></category>
		<category><![CDATA[Record lock]]></category>
		<category><![CDATA[RPG Record Locks]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I wanted to do Chain Kfld File1 If Found And Fld1 = &#8216;Y&#8217;    Update File Else   Perform Next Chain Operation Endif Here I wanted to perform the Chain without Locking the Record. I wanted to perform Update Operation without Performing Read/Chain again if the Condition is True. How to achieve this?]]></description>
				<content:encoded><![CDATA[<p>I wanted to do <br/><br/> Chain Kfld File1 <br/><br/> If Found And Fld1 = &#8216;Y&#8217; <br/><br/>    Update File <br/><br/> Else <br/><br/>   Perform Next Chain Operation <br/><br/> Endif <br/><br/> Here I wanted to perform the Chain without Locking the Record. I wanted to perform Update Operation without Performing Read/Chain again if the Condition is True. How to achieve this?<br/><br/></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/as400-file-3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>When will AS/400 record lock?</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/when-record-will-be-locked/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/when-record-will-be-locked/#comments</comments>
		<pubDate>Sat, 25 Sep 2010 08:58:15 +0000</pubDate>
		<dc:creator>SARKNS</dc:creator>
				<category><![CDATA[AS/400 Records]]></category>
		<category><![CDATA[Record lock]]></category>
		<category><![CDATA[RPG Record Locks]]></category>
		<category><![CDATA[RPGLE]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Hi Guru&#8217;s , I am new to RPG . I would like to know when record will be locked ? Example-1 : PGMA, using a PF1(Physical file) in input mode , PGMB using a logical file based on PF1, in input mode. In this case record will be locked or not (using read or chain [...]]]></description>
				<content:encoded><![CDATA[<p>Hi Guru&#8217;s , I am new to RPG . I would like to know when record will be locked ? Example-1 : PGMA, using a PF1(Physical file) in input mode , PGMB using a logical file based on PF1, in input mode. In this case record will be locked or not (using read or chain or setll operation codes) ? If I will use pf1 in PGMA as inupt mode and in PGMB as update mode , does record will be locked or not ? I have seen when both the files in both the programs using file type in update modere record has been locked .</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/when-record-will-be-locked/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Records lock error</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/records-lock-error/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/records-lock-error/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 10:33:48 +0000</pubDate>
		<dc:creator>Tbartlett2010</dc:creator>
				<category><![CDATA[AS/400 Locking]]></category>
		<category><![CDATA[AS/400 Records]]></category>
		<category><![CDATA[Record lock]]></category>
		<category><![CDATA[RPG Record Locks]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I keep getting a records lock error even after I change the setting to no records lock.]]></description>
				<content:encoded><![CDATA[<p>I keep getting a records lock error even after I change the setting to no records lock.</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/records-lock-error/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Record Locking</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/record-locking-2/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/record-locking-2/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 18:59:13 +0000</pubDate>
		<dc:creator>RonKoontz</dc:creator>
				<category><![CDATA[AS/400]]></category>
		<category><![CDATA[RPG Record Locks]]></category>
		<category><![CDATA[RPGLE]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I&#8217;m using embeded SQL to delete (clear) all records in a file. I do not want more than 1 person in this file. So whe the user executes the program it runs the SQL and clears the records in the file. Now I want to do some file/record checking logic to see if the file [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m using embeded SQL to delete (clear) all records in a file. I do not want more than 1 person in this file. So whe the user executes the program it runs the SQL and clears the records in the file. Now I want to do some file/record checking logic to see if the file is locked to another job. THen snd user a message saying its not available. ( I know how do do that part) How can I do check that the file is locked in RPGLE. [strong][em]I know I can do it in CL and I don&#8217;t want to do it that way.[/em][/strong]  Any ideas..<br/><br/> Thanks<br/><br/>  <br/><br/></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/record-locking-2/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Difference between Record and File locks</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/difference-between-record-and-file-locks/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/difference-between-record-and-file-locks/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 16:48:01 +0000</pubDate>
		<dc:creator>GTank</dc:creator>
				<category><![CDATA[RPG]]></category>
		<category><![CDATA[RPG File Locks]]></category>
		<category><![CDATA[RPG Record Locks]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[New Discussion Post by TomLiotta]]></description>
				<content:encoded><![CDATA[New Discussion Post by TomLiotta]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/difference-between-record-and-file-locks/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</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/24 queries in 0.030 seconds using memcached
Object Caching 785/899 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-22 22:54:53 -->