<?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: OCL to CL conversion</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/ocl-to-cl-conversion/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/ocl-to-cl-conversion/</link>
	<description></description>
	<lastBuildDate>Thu, 20 Jun 2013 10:14:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/ocl-to-cl-conversion/#comment-92466</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Fri, 20 May 2011 23:58:18 +0000</pubDate>
		<guid isPermaLink="false">#comment-92466</guid>
		<description><![CDATA[Typo -- {if the file was “active” at the beginning} should be {if the file was &lt;b&gt;not&lt;/b&gt; “active” at the beginning.}

Tom]]></description>
		<content:encoded><![CDATA[<p>Typo &#8212; {if the file was “active” at the beginning} should be {if the file was <b>not</b> “active” at the beginning.}</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/ocl-to-cl-conversion/#comment-92465</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Fri, 20 May 2011 23:56:10 +0000</pubDate>
		<guid isPermaLink="false">#comment-92465</guid>
		<description><![CDATA[ALCOBJ can give an indication if the file is &quot;in use&quot;. But keep in mind that if the command succeeds, you should probably immediately deallocate the file.

What I usually do is a sequence like this:&lt;pre&gt;
ALCOBJ (&lt;file ID&gt; *EXCL)
MONMSG (CPF1002) ...
ALCOBJ (&lt;file ID&gt; *SHRxx)
DLCOBJ (&lt;file ID&gt; *EXCL)&lt;/pre&gt;
Then the programming continues.

That is, I try to allocate exclusively. I would have a MONMSG after the first ALCOBJ to catch a failure of exclusive access; the action to take would depend on what needed to be done for that program.

If the first ALCOBJ succeeded, the second ALCOBJ would set whatever access level that I actually wanted. Once that was set, I would deallocate the initial exclusive lock.

The final result is a shared lock that would only be possible if the file was &quot;active&quot; at the beginning.

All of that might need clarification depending on what is meant by &quot;active&quot; and what the purpose of testing for &quot;active&quot; is in the first place. Usually the use of that S/36 OCL feature is inappropriate in native AS/400 procedures. It most often means that a process should be redesigned to work according to how this system can do things.

For example, it might be that there is a desire to clear a file; but that it shouldn&#039;t be done while the file is &quot;active&quot;. Well, if the file is &quot;active&quot; and you try to run a CLRPFM command against it, the CLRPFM command itself will report back that the file is &quot;active&quot;. In such a case, there&#039;s no point to running a specific test ahead of time.

Tom]]></description>
		<content:encoded><![CDATA[<p>ALCOBJ can give an indication if the file is &#8220;in use&#8221;. But keep in mind that if the command succeeds, you should probably immediately deallocate the file.</p>
<p>What I usually do is a sequence like this:
<pre>
ALCOBJ (&lt;file ID&gt; *EXCL)
MONMSG (CPF1002) ...
ALCOBJ (&lt;file ID&gt; *SHRxx)
DLCOBJ (&lt;file ID&gt; *EXCL)</pre>
<p>Then the programming continues.</p>
<p>That is, I try to allocate exclusively. I would have a MONMSG after the first ALCOBJ to catch a failure of exclusive access; the action to take would depend on what needed to be done for that program.</p>
<p>If the first ALCOBJ succeeded, the second ALCOBJ would set whatever access level that I actually wanted. Once that was set, I would deallocate the initial exclusive lock.</p>
<p>The final result is a shared lock that would only be possible if the file was &#8220;active&#8221; at the beginning.</p>
<p>All of that might need clarification depending on what is meant by &#8220;active&#8221; and what the purpose of testing for &#8220;active&#8221; is in the first place. Usually the use of that S/36 OCL feature is inappropriate in native AS/400 procedures. It most often means that a process should be redesigned to work according to how this system can do things.</p>
<p>For example, it might be that there is a desire to clear a file; but that it shouldn&#8217;t be done while the file is &#8220;active&#8221;. Well, if the file is &#8220;active&#8221; and you try to run a CLRPFM command against it, the CLRPFM command itself will report back that the file is &#8220;active&#8221;. In such a case, there&#8217;s no point to running a specific test ahead of time.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: charliebrowne</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/ocl-to-cl-conversion/#comment-92363</link>
		<dc:creator>charliebrowne</dc:creator>
		<pubDate>Fri, 20 May 2011 03:00:40 +0000</pubDate>
		<guid isPermaLink="false">#comment-92363</guid>
		<description><![CDATA[You can use ALCOBJ with *EXCL to ensure no one else is using the file.]]></description>
		<content:encoded><![CDATA[<p>You can use ALCOBJ with *EXCL to ensure no one else is using the file.</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.038 seconds using memcached
Object Caching 295/301 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-06-20 10:18:17 -->