<?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: Using CL Commands</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/cl-commands/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/cl-commands/</link>
	<description></description>
	<lastBuildDate>Thu, 20 Jun 2013 01:19:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/cl-commands/#comment-96846</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Tue, 20 Sep 2011 22:49:34 +0000</pubDate>
		<guid isPermaLink="false">#comment-96846</guid>
		<description><![CDATA[There are multiple possible answers depending on your intended purpose.

One answer is simply not to use CL for things like CHKOBJ. If you want to check if an object exists, call the &lt;a href=&quot;http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Fapis%2Fqusrobjd.htm&quot;&gt;Retrieve Object Description (QUSROBJD) API&lt;/a&gt; instead of calling another API to execute a command. Or if you want to check authorities to an object, call the &lt;a href=&quot;http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Fapis%2FQSYCUSRA.htm&quot;&gt;Check User Authority to an Object (QSYCUSRA) API&lt;/a&gt;.

Or don&#039;t put CL into RPG -- put it into a CL module and bind it for a procedure. Compile it rather than calling an API to interpret it. The CL compiler already does a lot of work for you. Why write RPG code to construct a command in a string out of multiple variables, pass it to an API and then handle whatever results it might log in the job? That&#039;s all easier to do in a module that&#039;s written in the appropriate language.

If there is some reason to interpret and run a CL command, you can call the &lt;a href=&quot;http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Fapis%2Fqcapcmd.htm&quot;&gt;Process Commands (QCAPCMD) API&lt;/a&gt;, the &lt;a href=&quot;http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Fapis%2Fqcmdexc.htm&quot;&gt;Execute Command (QCMDEXC) API&lt;/a&gt;, the &lt;a href=&quot;http://publib.boulder.ibm.com/infocenter/iseries/v7r1m0/index.jsp?topic=%2Frtref%2Fsystem.htm&quot;&gt;system() Execute a Command&lt;/a&gt; C library function and one or two others.

Tom]]></description>
		<content:encoded><![CDATA[<p>There are multiple possible answers depending on your intended purpose.</p>
<p>One answer is simply not to use CL for things like CHKOBJ. If you want to check if an object exists, call the <a href="http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Fapis%2Fqusrobjd.htm">Retrieve Object Description (QUSROBJD) API</a> instead of calling another API to execute a command. Or if you want to check authorities to an object, call the <a href="http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Fapis%2FQSYCUSRA.htm">Check User Authority to an Object (QSYCUSRA) API</a>.</p>
<p>Or don&#8217;t put CL into RPG &#8212; put it into a CL module and bind it for a procedure. Compile it rather than calling an API to interpret it. The CL compiler already does a lot of work for you. Why write RPG code to construct a command in a string out of multiple variables, pass it to an API and then handle whatever results it might log in the job? That&#8217;s all easier to do in a module that&#8217;s written in the appropriate language.</p>
<p>If there is some reason to interpret and run a CL command, you can call the <a href="http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Fapis%2Fqcapcmd.htm">Process Commands (QCAPCMD) API</a>, the <a href="http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Fapis%2Fqcmdexc.htm">Execute Command (QCMDEXC) API</a>, the <a href="http://publib.boulder.ibm.com/infocenter/iseries/v7r1m0/index.jsp?topic=%2Frtref%2Fsystem.htm">system() Execute a Command</a> C library function and one or two others.</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 3/10 queries in 0.030 seconds using memcached
Object Caching 267/273 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-06-20 02:40:15 -->