<?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: CL program to transfer a job to QINTER</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/cl-program-7/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/cl-program-7/</link>
	<description></description>
	<lastBuildDate>Thu, 20 Jun 2013 04:39:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: aringarosa</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/cl-program-7/#comment-96675</link>
		<dc:creator>aringarosa</dc:creator>
		<pubDate>Fri, 16 Sep 2011 08:42:10 +0000</pubDate>
		<guid isPermaLink="false">#comment-96675</guid>
		<description><![CDATA[i&#039;m sorry Tom. My mistake, problem solved.]]></description>
		<content:encoded><![CDATA[<p>i&#8217;m sorry Tom. My mistake, problem solved.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/cl-program-7/#comment-96655</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Thu, 15 Sep 2011 19:29:46 +0000</pubDate>
		<guid isPermaLink="false">#comment-96655</guid>
		<description><![CDATA[&lt;i&gt;I still have one problem, when i end telnet,...&lt;/i&gt;

Does the same problem show up if you start a new job before calling the program? There is no intelligence in the example code. If, for example, you run the program in a job that has tens of thousands of messages already in the *EXT message queue, it could take a significant amount of time for the program to look through them all.

Which &quot;telnet&quot; are you referring to? There are two &quot;telnets&quot; in the job -- you start with the first telnet session, then you call a program that starts a second telnet session to another system. Which one are you ending? How are you ending it? Which system sees &quot;60% cpu usage&quot;?

Tom]]></description>
		<content:encoded><![CDATA[<p><i>I still have one problem, when i end telnet,&#8230;</i></p>
<p>Does the same problem show up if you start a new job before calling the program? There is no intelligence in the example code. If, for example, you run the program in a job that has tens of thousands of messages already in the *EXT message queue, it could take a significant amount of time for the program to look through them all.</p>
<p>Which &#8220;telnet&#8221; are you referring to? There are two &#8220;telnets&#8221; in the job &#8212; you start with the first telnet session, then you call a program that starts a second telnet session to another system. Which one are you ending? How are you ending it? Which system sees &#8220;60% cpu usage&#8221;?</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aringarosa</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/cl-program-7/#comment-96624</link>
		<dc:creator>aringarosa</dc:creator>
		<pubDate>Thu, 15 Sep 2011 09:21:35 +0000</pubDate>
		<guid isPermaLink="false">#comment-96624</guid>
		<description><![CDATA[Thanks very much Tom. I&#039;ve learned a lot from you.
I still have one problem, when i end telnet, i get a full black screen and that job goes up to 60% cpu usage. It never ends telnet. Any clue why it happens.

Tanx]]></description>
		<content:encoded><![CDATA[<p>Thanks very much Tom. I&#8217;ve learned a lot from you.<br />
I still have one problem, when i end telnet, i get a full black screen and that job goes up to 60% cpu usage. It never ends telnet. Any clue why it happens.</p>
<p>Tanx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/cl-program-7/#comment-96595</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Wed, 14 Sep 2011 19:11:27 +0000</pubDate>
		<guid isPermaLink="false">#comment-96595</guid>
		<description><![CDATA[&lt;i&gt;isn’t the field dountil ( &amp;MsgId *eq ‘ ‘ ) incomplete?&lt;/i&gt;

No, it&#039;s just a little shortened. It tests for the condition where &amp;MsgId equals a blank. The RCVMSG command will return a blank value in the MSGID() parameter when there are no more messages to receive and the WAIT() time is expired. The default WAIT() time is zero. You could put seven blans between the quotes since &amp;MsgId is a 7-byte character variable, but the *EQ condition will happen if it&#039;s one blank or seven blanks.

I just coded a DOUNTIL for the automatic looping structure. If it runs out of messages, it will drop out of the loop.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>isn’t the field dountil ( &amp;MsgId *eq ‘ ‘ ) incomplete?</i></p>
<p>No, it&#8217;s just a little shortened. It tests for the condition where &amp;MsgId equals a blank. The RCVMSG command will return a blank value in the MSGID() parameter when there are no more messages to receive and the WAIT() time is expired. The default WAIT() time is zero. You could put seven blans between the quotes since &amp;MsgId is a 7-byte character variable, but the *EQ condition will happen if it&#8217;s one blank or seven blanks.</p>
<p>I just coded a DOUNTIL for the automatic looping structure. If it runs out of messages, it will drop out of the loop.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aringarosa</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/cl-program-7/#comment-96566</link>
		<dc:creator>aringarosa</dc:creator>
		<pubDate>Wed, 14 Sep 2011 10:05:44 +0000</pubDate>
		<guid isPermaLink="false">#comment-96566</guid>
		<description><![CDATA[Hi Tom, thank you for your help. Tell me something, isn&#039;t the field   &lt;b&gt;dountil   ( &amp;MsgId *eq ‘ ‘ )&lt;/b&gt; incomplete?]]></description>
		<content:encoded><![CDATA[<p>Hi Tom, thank you for your help. Tell me something, isn&#8217;t the field   <b>dountil   ( &amp;MsgId *eq ‘ ‘ )</b> incomplete?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/cl-program-7/#comment-96551</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Tue, 13 Sep 2011 23:09:50 +0000</pubDate>
		<guid isPermaLink="false">#comment-96551</guid>
		<description><![CDATA[&lt;i&gt;I’ve tried this MONMSG MSGID(CPF8902)...&lt;/i&gt;

Since CPF8902 is sent as a *DIAG message, you can&#039;t use MONMSG. You can only monitor for *ESCAPE, *STATUS and *NOTIFY messages.

For anything else, you need to receive the messages from the appropriate queue. Use the RCVMSG command or the &lt;a href=&quot;http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Fapis%2FQMHRCVPM.htm&quot;&gt;Receive Program Message (QMHRCVPM) API&lt;/a&gt; to receive those messages.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>I’ve tried this MONMSG MSGID(CPF8902)&#8230;</i></p>
<p>Since CPF8902 is sent as a *DIAG message, you can&#8217;t use MONMSG. You can only monitor for *ESCAPE, *STATUS and *NOTIFY messages.</p>
<p>For anything else, you need to receive the messages from the appropriate queue. Use the RCVMSG command or the <a href="http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Fapis%2FQMHRCVPM.htm">Receive Program Message (QMHRCVPM) API</a> to receive those messages.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/cl-program-7/#comment-96537</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Tue, 13 Sep 2011 20:13:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-96537</guid>
		<description><![CDATA[Try this:&lt;pre&gt;
pgm

   dcl   &amp;MsgId       *char     7
   dcl   &amp;RmtSys      *char   256     value( &#039;CCCAMCV&#039; )
   dcl   &amp;RmtVrtDsp   *char    10     value( &#039;OPERACAO&#039; )

   telnet      rmtsys( &amp;RmtSys ) rmtvrtdsp( &amp;RmtVrtDsp )

   dountil   ( &amp;MsgId *eq &#039; &#039; )
      rcvmsg   pgmq( *EXT ) msgtype( *DIAG ) msgid( &amp;MsgId )
      if ( &amp;MsgId *eq &#039;CPF8902&#039; )  do
         telnet rmtsys( &amp;RmtSys )
         leave
      enddo
   enddo

   return

endpgm&lt;/pre&gt;
Change the value for &amp;RmtSys when you want a different system. Change the value of &amp;RmtVrtDsp when you want a different device.

You should be able to compare messages in your joblog to the parms for RCVMSG to learn some of what&#039;s happening. Run TELNET from a command line a couple times and look at the message details for all messages it sends.

However, the code is not complete. It doesn&#039;t account for what may happen if you run it multiple times in the same job, especially if other TELNET commands have been run; and it doesn&#039;t do a good job of managing the messages in the *EXT message queue.

Part of the problem is that the information it uses comes from the job&#039;s *EXT message queue. Messages can get placed there by anything running in the job.

Another part is that you need to look at *DIAG (diagnostic) messages. Those are received in &lt;b&gt;first-in/last-out&lt;/b&gt; sequence. The first *DIAG messages in the *EXT message queue may have been placed there hours (or days!) before, depending on how long the job has run.

Much more sophistication is possible, but everything has to start from somewhere.

Tom]]></description>
		<content:encoded><![CDATA[<p>Try this:
<pre>
pgm

   dcl   &amp;MsgId       *char     7
   dcl   &amp;RmtSys      *char   256     value( 'CCCAMCV' )
   dcl   &amp;RmtVrtDsp   *char    10     value( 'OPERACAO' )

   telnet      rmtsys( &amp;RmtSys ) rmtvrtdsp( &amp;RmtVrtDsp )

   dountil   ( &amp;MsgId *eq ' ' )
      rcvmsg   pgmq( *EXT ) msgtype( *DIAG ) msgid( &amp;MsgId )
      if ( &amp;MsgId *eq 'CPF8902' )  do
         telnet rmtsys( &amp;RmtSys )
         leave
      enddo
   enddo

   return

endpgm</pre>
<p>Change the value for &amp;RmtSys when you want a different system. Change the value of &amp;RmtVrtDsp when you want a different device.</p>
<p>You should be able to compare messages in your joblog to the parms for RCVMSG to learn some of what&#8217;s happening. Run TELNET from a command line a couple times and look at the message details for all messages it sends.</p>
<p>However, the code is not complete. It doesn&#8217;t account for what may happen if you run it multiple times in the same job, especially if other TELNET commands have been run; and it doesn&#8217;t do a good job of managing the messages in the *EXT message queue.</p>
<p>Part of the problem is that the information it uses comes from the job&#8217;s *EXT message queue. Messages can get placed there by anything running in the job.</p>
<p>Another part is that you need to look at *DIAG (diagnostic) messages. Those are received in <b>first-in/last-out</b> sequence. The first *DIAG messages in the *EXT message queue may have been placed there hours (or days!) before, depending on how long the job has run.</p>
<p>Much more sophistication is possible, but everything has to start from somewhere.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rickmcd</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/cl-program-7/#comment-96527</link>
		<dc:creator>rickmcd</dc:creator>
		<pubDate>Tue, 13 Sep 2011 15:06:26 +0000</pubDate>
		<guid isPermaLink="false">#comment-96527</guid>
		<description><![CDATA[Off the top of my head cl should be
PGM
telnet 
   MONMSG     MSGID(CPF2204) EXEC(TELNET RMTSYS(RMTSYS) +   
                RMTVRTDSP(VIRTDSP2))    
endpgm
then if not working check log again.]]></description>
		<content:encoded><![CDATA[<p>Off the top of my head cl should be<br />
PGM<br />
telnet<br />
   MONMSG     MSGID(CPF2204) EXEC(TELNET RMTSYS(RMTSYS) +<br />
                RMTVRTDSP(VIRTDSP2))<br />
endpgm<br />
then if not working check log again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aringarosa</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/cl-program-7/#comment-96521</link>
		<dc:creator>aringarosa</dc:creator>
		<pubDate>Tue, 13 Sep 2011 14:42:10 +0000</pubDate>
		<guid isPermaLink="false">#comment-96521</guid>
		<description><![CDATA[the error recieved is...cpf8902...this is killing me]]></description>
		<content:encoded><![CDATA[<p>the error recieved is&#8230;cpf8902&#8230;this is killing me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rickmcd</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/cl-program-7/#comment-96520</link>
		<dc:creator>rickmcd</dc:creator>
		<pubDate>Tue, 13 Sep 2011 14:37:39 +0000</pubDate>
		<guid isPermaLink="false">#comment-96520</guid>
		<description><![CDATA[The only thing to do is after running the CL make sure it was compiled with Log CL Commands and after running from Command line look at joblog to see what errors received.]]></description>
		<content:encoded><![CDATA[<p>The only thing to do is after running the CL make sure it was compiled with Log CL Commands and after running from Command line look at joblog to see what errors received.</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.046 seconds using memcached
Object Caching 393/399 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-06-20 05:57:39 -->