 




<?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: Retrieve error message in RPG</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/retrieve-error-message-in-rpg/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/retrieve-error-message-in-rpg/</link>
	<description></description>
	<lastBuildDate>Wed, 22 May 2013 18:27:48 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: old2new</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/retrieve-error-message-in-rpg/#comment-69037</link>
		<dc:creator>old2new</dc:creator>
		<pubDate>Wed, 14 Oct 2009 13:41:59 +0000</pubDate>
		<guid isPermaLink="false">#comment-69037</guid>
		<description><![CDATA[Tom and Charlie, Thank you for your feedback. I will use these ideas.]]></description>
		<content:encoded><![CDATA[<p>Tom and Charlie, Thank you for your feedback. I will use these ideas.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/retrieve-error-message-in-rpg/#comment-69017</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Tue, 13 Oct 2009 23:21:04 +0000</pubDate>
		<guid isPermaLink="false">#comment-69017</guid>
		<description><![CDATA[Given everything so far, CharlieBrowne is right. Everything &lt;b&gt;should&lt;/b&gt; be visible in the interactive joblog when EDPROC ends. A DSPJOBLOG command at that point should show everything. (Assuming that CMLSTSPEC put messages into the joblog and that other programming that&#039;s left out didn&#039;t remove the messages.)

You might get by with:
&lt;pre&gt;
call pgm(eod_job_P) parm(’CMLSTSPEC ‘ &amp;testout)
if ( &amp;testout *eq &#039;H&#039; *or &amp;testout *eq &#039;I&#039; )  do
   DSPJOBLOG  OUTPUT(*PRINT)
enddo
&lt;/pre&gt;
Whether anything gets spooled or not will depend on how the job logging levels are set and how messages are handled in the programming. (I wouldn&#039;t expect them to be removed.)

The logging level might be set automatically. However, you might not want to trust that. You can put:
&lt;pre&gt;
CHGJOB LOG(4 00 *SECLVL)
call pgm(eod_job_P) parm(’CMLSTSPEC ‘ &amp;testout)
&lt;/pre&gt;
to set the level before calling eod_job_P. That sets the level so that DSPJOBLOG is more sure to have something useful to print. (Add [LOGCLPGM(*YES)] to the CHGJOB command if you need to see any CL commands that might be in there.)

What is the purpose of the eod_job_P program? It doesn&#039;t seem to do anything that couldn&#039;t be done directly in EDPROC.

Tom]]></description>
		<content:encoded><![CDATA[<p>Given everything so far, CharlieBrowne is right. Everything <b>should</b> be visible in the interactive joblog when EDPROC ends. A DSPJOBLOG command at that point should show everything. (Assuming that CMLSTSPEC put messages into the joblog and that other programming that&#8217;s left out didn&#8217;t remove the messages.)</p>
<p>You might get by with:</p>
<pre>
call pgm(eod_job_P) parm(’CMLSTSPEC ‘ &amp;testout)
if ( &amp;testout *eq 'H' *or &amp;testout *eq 'I' )  do
   DSPJOBLOG  OUTPUT(*PRINT)
enddo
</pre>
<p>Whether anything gets spooled or not will depend on how the job logging levels are set and how messages are handled in the programming. (I wouldn&#8217;t expect them to be removed.)</p>
<p>The logging level might be set automatically. However, you might not want to trust that. You can put:</p>
<pre>
CHGJOB LOG(4 00 *SECLVL)
call pgm(eod_job_P) parm(’CMLSTSPEC ‘ &amp;testout)
</pre>
<p>to set the level before calling eod_job_P. That sets the level so that DSPJOBLOG is more sure to have something useful to print. (Add [LOGCLPGM(*YES)] to the CHGJOB command if you need to see any CL commands that might be in there.)</p>
<p>What is the purpose of the eod_job_P program? It doesn&#8217;t seem to do anything that couldn&#8217;t be done directly in EDPROC.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: charliebrowne</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/retrieve-error-message-in-rpg/#comment-68999</link>
		<dc:creator>charliebrowne</dc:creator>
		<pubDate>Tue, 13 Oct 2009 16:37:56 +0000</pubDate>
		<guid isPermaLink="false">#comment-68999</guid>
		<description><![CDATA[That job is running interactive.
You should be able use DEBUG to step into it and determine error.
also if you CHGJOB LOG(4 00 *SECLVL) LOGCLPGM(*YES) 
you should get all the information you need.]]></description>
		<content:encoded><![CDATA[<p>That job is running interactive.<br />
You should be able use DEBUG to step into it and determine error.<br />
also if you CHGJOB LOG(4 00 *SECLVL) LOGCLPGM(*YES)<br />
you should get all the information you need.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: old2new</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/retrieve-error-message-in-rpg/#comment-68988</link>
		<dc:creator>old2new</dc:creator>
		<pubDate>Tue, 13 Oct 2009 15:26:36 +0000</pubDate>
		<guid isPermaLink="false">#comment-68988</guid>
		<description><![CDATA[I&#039;m sorry if my question was a little confusing. Below is parts of the CL (EDPROC) that is called interactively and the RPG program that it calls to run a third job job. The called job at (A) can be RPG or CL. I would like to be able to get enough info to determine the cause of a problem if the called program at (A) aborts.

EDPROC (CLLE program)
	 call       pgm(eod_job_P) parm(&#039;CMLSTSPEC &#039; &amp;testout) 
--------------------------------------------------------------------
EOD_JOB_P (RPGLE program)
d eod_job_p       pi                                    
d pgmname                       10a   const             
d status                         1a   options(*nopass)  
d brl                            1a   options(*nopass)  
d whs                            1  0 options(*nopass)  

    eodjobnam = pgmname;     
    exsr RunTheJob;           
     if PassStatus;           
       status = WrkStatus;    
     ENDIF;                   
    return;                   

   //-----------------------------------------------------------
   begsr RunTheJob;                                             
                                                                
  /end-free                                                     
 c                   call(e)   eodjobnam        (A)                
  /free                                                         
    select;                                                     
     when %status = 202 or %status = 231 or %status = 232;      
       wrkstatus = &#039;H&#039;; 
       exsr senderrmsg;                                      
     when %status = 211;                                        
       wrkstatus = &#039;I&#039;; 
       exsr senderrmsg;                                  
     other;                                                     
     wrkstatus = &#039;C&#039;;    // Completed                           
    endsl; 
   endsr;

   //----------------------------------------------------------------------
 begsr senderrmsg;                                                       
                                                                         
  select;                                                                
   when wrkstatus = &#039;H&#039;;        // Called Job Failed/Halted              
     cmd = teststatus+&#039;-EDPROC Called Program &#039;+%trim(eodjobnam)+        
           &#039; failed for branch &#039;+wrkbrl+%char(wrkwhs)+&#039;. Examine +       
           the job log before answering. Job Stopped. +                  
           Status = H&#039;;                                                                                                          
     exsr email;                                                         
     exsr errlog;                                                        
   when wrkstatus = &#039;I&#039;;       // Error Calling program                  
     cmd = teststatus+&#039;-EDPROC Error calling program &#039;+%trim(eodjobnam)+ 
            &#039; for branch &#039;+wrkbrl+%char(wrkwhs)+&#039;. Job Stopped. +        
           Status = I&#039;;                                                                                                    
     exsr email;                                                         
     exsr errlog;                                                        
  endsl;
 endsr;]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m sorry if my question was a little confusing. Below is parts of the CL (EDPROC) that is called interactively and the RPG program that it calls to run a third job job. The called job at (A) can be RPG or CL. I would like to be able to get enough info to determine the cause of a problem if the called program at (A) aborts.</p>
<p>EDPROC (CLLE program)<br />
	 call       pgm(eod_job_P) parm(&#8216;CMLSTSPEC &#8216; &amp;testout)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
EOD_JOB_P (RPGLE program)<br />
d eod_job_p       pi<br />
d pgmname                       10a   const<br />
d status                         1a   options(*nopass)<br />
d brl                            1a   options(*nopass)<br />
d whs                            1  0 options(*nopass)  </p>
<p>    eodjobnam = pgmname;<br />
    exsr RunTheJob;<br />
     if PassStatus;<br />
       status = WrkStatus;<br />
     ENDIF;<br />
    return;                   </p>
<p>   //&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
   begsr RunTheJob;                                             </p>
<p>  /end-free<br />
 c                   call(e)   eodjobnam        (A)<br />
  /free<br />
    select;<br />
     when %status = 202 or %status = 231 or %status = 232;<br />
       wrkstatus = &#8216;H&#8217;;<br />
       exsr senderrmsg;<br />
     when %status = 211;<br />
       wrkstatus = &#8216;I&#8217;;<br />
       exsr senderrmsg;<br />
     other;<br />
     wrkstatus = &#8216;C&#8217;;    // Completed<br />
    endsl;<br />
   endsr;</p>
<p>   //&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
 begsr senderrmsg;                                                       </p>
<p>  select;<br />
   when wrkstatus = &#8216;H&#8217;;        // Called Job Failed/Halted<br />
     cmd = teststatus+&#8217;-EDPROC Called Program &#8216;+%trim(eodjobnam)+<br />
           &#8216; failed for branch &#8216;+wrkbrl+%char(wrkwhs)+&#8217;. Examine +<br />
           the job log before answering. Job Stopped. +<br />
           Status = H&#8217;;<br />
     exsr email;<br />
     exsr errlog;<br />
   when wrkstatus = &#8216;I&#8217;;       // Error Calling program<br />
     cmd = teststatus+&#8217;-EDPROC Error calling program &#8216;+%trim(eodjobnam)+<br />
            &#8216; for branch &#8216;+wrkbrl+%char(wrkwhs)+&#8217;. Job Stopped. +<br />
           Status = I&#8217;;<br />
     exsr email;<br />
     exsr errlog;<br />
  endsl;<br />
 endsr;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/retrieve-error-message-in-rpg/#comment-68964</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Mon, 12 Oct 2009 22:21:56 +0000</pubDate>
		<guid isPermaLink="false">#comment-68964</guid>
		<description><![CDATA[&gt;  ...and that job is not interactive.

That seems to indicate that PGMA doesn&#039;t call RPG3P. Instead, it makes it seem like PGMA submits a batch job that calls RPG3P. The spooled joblog of that batch job doesn&#039;t give you enough information to learn why the abort happened.

Does that describe your situation? If not, can you tell us more?

Tom]]></description>
		<content:encoded><![CDATA[<p>&gt;  &#8230;and that job is not interactive.</p>
<p>That seems to indicate that PGMA doesn&#8217;t call RPG3P. Instead, it makes it seem like PGMA submits a batch job that calls RPG3P. The spooled joblog of that batch job doesn&#8217;t give you enough information to learn why the abort happened.</p>
<p>Does that describe your situation? If not, can you tell us more?</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 6/9 queries in 0.015 seconds using memcached
Object Caching 324/327 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-22 21:10:58 -->