 




<?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: Outfile for WRKJOB command.</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/outfile-for-wrkjob-command/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/outfile-for-wrkjob-command/</link>
	<description></description>
	<lastBuildDate>Sat, 25 May 2013 10:29:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: TomLiotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/outfile-for-wrkjob-command/#comment-115795</link>
		<dc:creator>TomLiotta</dc:creator>
		<pubDate>Fri, 01 Feb 2013 22:30:45 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/itanswers/outfile-for-wrkjob-command/#comment-115795</guid>
		<description><![CDATA[&lt;EM&gt;...which have the list of all the jobs run on which date and through that we can get directly the spool file of the any job run previously…&lt;/EM&gt;
&#160;
That helps a little, but it misses a big part.
&#160;
You can simply run WRKJOB for that job name from a command line to get access to all the spooled files. Or iSeries Navigator will bring up a list of all jobs of that name that have spooled output, and you can work with spooled files from there. Why do you need a utility for it? What does the utility need to do that isn&#039;t already available?
&#160;
It&#039;s fairly easy for me to create that kind of utility on my systems because I already have a lot of little procedures that I can bind together to do it. It will take more work for you unless you also have code to do the parts that go into it. To know the right parts, it&#160;needs knowing what the purpose is. What will the utility be used for? How will it be used? Who will use it?
&#160;
Tom]]></description>
		<content:encoded><![CDATA[<p><em>&#8230;which have the list of all the jobs run on which date and through that we can get directly the spool file of the any job run previously…</em><br />
&nbsp;<br />
That helps a little, but it misses a big part.<br />
&nbsp;<br />
You can simply run WRKJOB for that job name from a command line to get access to all the spooled files. Or iSeries Navigator will bring up a list of all jobs of that name that have spooled output, and you can work with spooled files from there. Why do you need a utility for it? What does the utility need to do that isn&#8217;t already available?<br />
&nbsp;<br />
It&#8217;s fairly easy for me to create that kind of utility on my systems because I already have a lot of little procedures that I can bind together to do it. It will take more work for you unless you also have code to do the parts that go into it. To know the right parts, it&nbsp;needs knowing what the purpose is. What will the utility be used for? How will it be used? Who will use it?<br />
&nbsp;<br />
Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ToddN2000</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/outfile-for-wrkjob-command/#comment-115786</link>
		<dc:creator>ToddN2000</dc:creator>
		<pubDate>Fri, 01 Feb 2013 16:13:16 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/itanswers/outfile-for-wrkjob-command/#comment-115786</guid>
		<description><![CDATA[If you want the spoolfile contents of all the times the job was run yo may be able to do it this way. If all the output was directed to 1&#160;OUTQ you could dump the contents to a spool file. Copy that to a PF. Read that pf for the spool file info and copy that to another flat file with an add option for each spoolfile. Something like this...&lt;pre&gt;             PGM                                                          
                                                                  
             DCL        VAR(&amp;SPOOL)  TYPE(*CHAR) LEN(6)           
             DCL        VAR(&amp;JOBNR)  TYPE(*CHAR) LEN(6)           
             DCL        VAR(&amp;CLWORK) TYPE(*CHAR) LEN(132)         
             DCL        VAR(&amp;USRNM)  TYPE(*CHAR) LEN(10)          
             DCL        VAR(&amp;JOBNM)  TYPE(*CHAR) LEN(10)          
                                                                  
             DCLF       FILE(WORK)                                
                                                                  
             WRKOUTQ    OUTQ(FRNPRT) OUTPUT(*PRINT)               
             CPYSPLF    FILE(QPRTSPLQ) TOFILE(WORK)               
             DLTSPLF    FILE(QPRTSPLQ)                            
                                                                  
/* Read spool entries                                          */ 
                                                                  
TAG01:       RCVF                                                 
             MONMSG     MSGID(CPF0000) EXEC(GOTO CMDLBL(TAGDONE))   
                                                                  
/* GET SPOOL FILE                                                   */          
                                                                                
             CHGVAR     VAR(&amp;JOBNR) VALUE(%SST(&amp;CLWORK 95 6))                   
             CHGVAR     VAR(&amp;SPOOL) VALUE(%SST(&amp;CLWORK 75 4))                   
             CHGVAR     VAR(&amp;USRNM) VALUE(%SST(&amp;CLWORK 13 10))                  
             CHGVAR     VAR(&amp;JOBNM) VALUE(%SST(&amp;CLWORK 84 10))                  
                                                                                
/*  Zero fill spool number                                       */             
             IF         COND(%SST(&amp;SPOOL 1 1) *EQ &#039; &#039;) THEN(CHGVAR +            
                          VAR(%SST(&amp;SPOOL 1 1)) VALUE(&#039;0&#039;))                     
             IF         COND(%SST(&amp;SPOOL 2 1) *EQ &#039; &#039;) THEN(CHGVAR +            
                          VAR(%SST(&amp;SPOOL 2 1)) VALUE(&#039;0&#039;))                     
             IF         COND(%SST(&amp;SPOOL 3 1) *EQ &#039; &#039;) THEN(CHGVAR +            
                          VAR(%SST(&amp;SPOOL 3 1)) VALUE(&#039;0&#039;))                     
                                                                                
/* COPY TO DATABASE                                                 */          
                                                                                
             CPYSPLF    FILE(QSYSPRT) TOFILE(MY_LIB/MY_DB) +                    
                          JOB(&amp;JOBNR/&amp;USRNM/&amp;JOBNM) SPLNBR(&amp;SPOOL) MBROPT(*ADD) 
             GOTO       CMDLBL(TAG01)                                           
                     
 TAGDONE:    ENDPGM &lt;/pre&gt;&#160;&#160;]]></description>
		<content:encoded><![CDATA[<p>If you want the spoolfile contents of all the times the job was run yo may be able to do it this way. If all the output was directed to 1&nbsp;OUTQ you could dump the contents to a spool file. Copy that to a PF. Read that pf for the spool file info and copy that to another flat file with an add option for each spoolfile. Something like this&#8230;
<pre>             PGM                                                          
                                                                  
             DCL        VAR(&amp;SPOOL)  TYPE(*CHAR) LEN(6)           
             DCL        VAR(&amp;JOBNR)  TYPE(*CHAR) LEN(6)           
             DCL        VAR(&amp;CLWORK) TYPE(*CHAR) LEN(132)         
             DCL        VAR(&amp;USRNM)  TYPE(*CHAR) LEN(10)          
             DCL        VAR(&amp;JOBNM)  TYPE(*CHAR) LEN(10)          
                                                                  
             DCLF       FILE(WORK)                                
                                                                  
             WRKOUTQ    OUTQ(FRNPRT) OUTPUT(*PRINT)               
             CPYSPLF    FILE(QPRTSPLQ) TOFILE(WORK)               
             DLTSPLF    FILE(QPRTSPLQ)                            
                                                                  
/* Read spool entries                                          */ 
                                                                  
TAG01:       RCVF                                                 
             MONMSG     MSGID(CPF0000) EXEC(GOTO CMDLBL(TAGDONE))   
                                                                  
/* GET SPOOL FILE                                                   */          
                                                                                
             CHGVAR     VAR(&amp;JOBNR) VALUE(%SST(&amp;CLWORK 95 6))                   
             CHGVAR     VAR(&amp;SPOOL) VALUE(%SST(&amp;CLWORK 75 4))                   
             CHGVAR     VAR(&amp;USRNM) VALUE(%SST(&amp;CLWORK 13 10))                  
             CHGVAR     VAR(&amp;JOBNM) VALUE(%SST(&amp;CLWORK 84 10))                  
                                                                                
/*  Zero fill spool number                                       */             
             IF         COND(%SST(&amp;SPOOL 1 1) *EQ ' ') THEN(CHGVAR +            
                          VAR(%SST(&amp;SPOOL 1 1)) VALUE('0'))                     
             IF         COND(%SST(&amp;SPOOL 2 1) *EQ ' ') THEN(CHGVAR +            
                          VAR(%SST(&amp;SPOOL 2 1)) VALUE('0'))                     
             IF         COND(%SST(&amp;SPOOL 3 1) *EQ ' ') THEN(CHGVAR +            
                          VAR(%SST(&amp;SPOOL 3 1)) VALUE('0'))                     
                                                                                
/* COPY TO DATABASE                                                 */          
                                                                                
             CPYSPLF    FILE(QSYSPRT) TOFILE(MY_LIB/MY_DB) +                    
                          JOB(&amp;JOBNR/&amp;USRNM/&amp;JOBNM) SPLNBR(&amp;SPOOL) MBROPT(*ADD) 
             GOTO       CMDLBL(TAG01)                                           
                     
 TAGDONE:    ENDPGM </pre>
<p>&nbsp;&nbsp;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ddaswani</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/outfile-for-wrkjob-command/#comment-115781</link>
		<dc:creator>ddaswani</dc:creator>
		<pubDate>Fri, 01 Feb 2013 14:55:37 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/itanswers/outfile-for-wrkjob-command/#comment-115781</guid>
		<description><![CDATA[Hi Tom,

We are using Robot for scheduling and other stuff, but now instead of Robot, We are using ESP which is on mainframes...so ESP kick off the job...

Now the main problem is like Robot keep all the Spool file under the Job with all the history..ESP saves the history for 1 day...

Now what i m trying to do..is built a similar sort of utility..which have the list of all the jobs run on which date and through that we can get directly the spool file of the any job run previously...

I hope u got my point.]]></description>
		<content:encoded><![CDATA[<p>Hi Tom,</p>
<p>We are using Robot for scheduling and other stuff, but now instead of Robot, We are using ESP which is on mainframes&#8230;so ESP kick off the job&#8230;</p>
<p>Now the main problem is like Robot keep all the Spool file under the Job with all the history..ESP saves the history for 1 day&#8230;</p>
<p>Now what i m trying to do..is built a similar sort of utility..which have the list of all the jobs run on which date and through that we can get directly the spool file of the any job run previously&#8230;</p>
<p>I hope u got my point.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TomLiotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/outfile-for-wrkjob-command/#comment-115756</link>
		<dc:creator>TomLiotta</dc:creator>
		<pubDate>Fri, 01 Feb 2013 02:10:08 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/itanswers/outfile-for-wrkjob-command/#comment-115756</guid>
		<description><![CDATA[&lt;EM&gt;...it should dump it in sool fiile or some databse file.&lt;/EM&gt;
&#160;
What do you expect to find in any output file? How do you expect to process it? For most uses, neither WRKJOB nor DSPLOG will give you very much useful information. To process the output, a lot of messy programming will have to be done.
&#160;
If you describe what you actually need to do with the file, much better methods can be suggested.
&#160;
Tom]]></description>
		<content:encoded><![CDATA[<p><em>&#8230;it should dump it in sool fiile or some databse file.</em><br />
&nbsp;<br />
What do you expect to find in any output file? How do you expect to process it? For most uses, neither WRKJOB nor DSPLOG will give you very much useful information. To process the output, a lot of messy programming will have to be done.<br />
&nbsp;<br />
If you describe what you actually need to do with the file, much better methods can be suggested.<br />
&nbsp;<br />
Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ddaswani</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/outfile-for-wrkjob-command/#comment-115748</link>
		<dc:creator>ddaswani</dc:creator>
		<pubDate>Thu, 31 Jan 2013 21:50:52 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/itanswers/outfile-for-wrkjob-command/#comment-115748</guid>
		<description><![CDATA[Thanks LtitBe.It should work.]]></description>
		<content:encoded><![CDATA[<p>Thanks LtitBe.It should work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LetItBe</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/outfile-for-wrkjob-command/#comment-115747</link>
		<dc:creator>LetItBe</dc:creator>
		<pubDate>Thu, 31 Jan 2013 21:42:54 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/itanswers/outfile-for-wrkjob-command/#comment-115747</guid>
		<description><![CDATA[DSPLOG QHST for a date range, specify output *print, press F10 for more parameters and enter ABCJOB&#160; for jobs to display.All ABCJOBs during that date range will be listed.]]></description>
		<content:encoded><![CDATA[<p>DSPLOG QHST for a date range, specify output *print, press F10 for more parameters and enter ABCJOB&nbsp; for jobs to display.All ABCJOBs during that date range will be listed.</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.039 seconds using memcached
Object Caching 337/343 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-25 11:35:00 -->