<?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: Combining printer files from multiple programs in one spool file in a job.</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/combining-printer-files-from-multiple-programs-in-one-spool-file-in-a-job/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/combining-printer-files-from-multiple-programs-in-one-spool-file-in-a-job/</link>
	<description></description>
	<lastBuildDate>Thu, 20 Jun 2013 03:53:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Featured Member: MDratwa - ITKE Community Blog</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/combining-printer-files-from-multiple-programs-in-one-spool-file-in-a-job/#comment-96035</link>
		<dc:creator>Featured Member: MDratwa - ITKE Community Blog</dc:creator>
		<pubDate>Thu, 01 Sep 2011 06:46:53 +0000</pubDate>
		<guid isPermaLink="false">#comment-96035</guid>
		<description><![CDATA[[...] Combining printer files from multiple programs in one spool file in a job [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Combining printer files from multiple programs in one spool file in a job [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/combining-printer-files-from-multiple-programs-in-one-spool-file-in-a-job/#comment-94690</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Wed, 27 Jul 2011 04:40:01 +0000</pubDate>
		<guid isPermaLink="false">#comment-94690</guid>
		<description><![CDATA[&lt;i&gt;They are all COBOL pgms...&lt;/i&gt;

For COBOL, try these elements. Change your CL to work like this:&lt;pre&gt;
   ovrprtf     PRINT1  share( *YES ) opnscope( *ACTGRPDFN )

   call        PRINT1O  &#039;*OPEN     &#039;

   call        PRINT1A
   call        PRINT1B
   call        PRINT1C

   call        PRINT1O  &#039;*CLOSE    &#039;

   dltovr      PRINT1&lt;/pre&gt;
I used different names for the series of COBOL programs to illustrate that the programs you call are all similar and use the same printer file. I added a new program to call before and after the usual sequence.

Here&#039;s the new COBOL program:&lt;pre&gt;
       PROCESS APOST NOPRTCORR
       Identification Division.
       Program-ID.     PRINT1O.
       Environment Division.

       Configuration Section.
       Source-computer.    IBM-AS400.
       Object-computer.    IBM-AS400.

       Input-output Section.
       File-control.
           select  PRINT1      assign to   formatfile-PRINT1
                               organization sequential.

       Data Division.
       File Section.
       FD  PRINT1
           label records are omitted.
       01  FD-PRINT1-REC.
           copy dds-all-formats of PRINT1.

       Working-storage Section.

       Linkage Section.

       01  lk-Ctl                          pic x(10).

       Procedure Division using
                               lk-Ctl .
       0-MAIN Section.

       0-MAIN-LINE.

      * Open the files...
           evaluate lk-Ctl
               when &#039;*OPEN&#039;
                   open    output  PRINT1

               when &#039;*CLOSE&#039;
                   close   PRINT1

           end-evaluate.

      * Close down the program...
           goback.&lt;/pre&gt;
In this example, the printer file is named PRINT1. For your job, the name would be LRS460O. The only purpose of this extra program is to add a hook into the opening and closing of the file. COBOL does things differently from RPG, so this helps connect the CL to the opening and closing of the file.

By opening the file and leaving it open, the subsequent programs can become connected to it. They can all use the same open data path rather than creating individual ones. The final close can happen after the other programs are done with it.

Then the override can be deleted.

Note that some adjustments might need to handle activation group details and possibly others.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>They are all COBOL pgms&#8230;</i></p>
<p>For COBOL, try these elements. Change your CL to work like this:
<pre>
   ovrprtf     PRINT1  share( *YES ) opnscope( *ACTGRPDFN )

   call        PRINT1O  '*OPEN     '

   call        PRINT1A
   call        PRINT1B
   call        PRINT1C

   call        PRINT1O  '*CLOSE    '

   dltovr      PRINT1</pre>
<p>I used different names for the series of COBOL programs to illustrate that the programs you call are all similar and use the same printer file. I added a new program to call before and after the usual sequence.</p>
<p>Here&#8217;s the new COBOL program:
<pre>
       PROCESS APOST NOPRTCORR
       Identification Division.
       Program-ID.     PRINT1O.
       Environment Division.

       Configuration Section.
       Source-computer.    IBM-AS400.
       Object-computer.    IBM-AS400.

       Input-output Section.
       File-control.
           select  PRINT1      assign to   formatfile-PRINT1
                               organization sequential.

       Data Division.
       File Section.
       FD  PRINT1
           label records are omitted.
       01  FD-PRINT1-REC.
           copy dds-all-formats of PRINT1.

       Working-storage Section.

       Linkage Section.

       01  lk-Ctl                          pic x(10).

       Procedure Division using
                               lk-Ctl .
       0-MAIN Section.

       0-MAIN-LINE.

      * Open the files...
           evaluate lk-Ctl
               when '*OPEN'
                   open    output  PRINT1

               when '*CLOSE'
                   close   PRINT1

           end-evaluate.

      * Close down the program...
           goback.</pre>
<p>In this example, the printer file is named PRINT1. For your job, the name would be LRS460O. The only purpose of this extra program is to add a hook into the opening and closing of the file. COBOL does things differently from RPG, so this helps connect the CL to the opening and closing of the file.</p>
<p>By opening the file and leaving it open, the subsequent programs can become connected to it. They can all use the same open data path rather than creating individual ones. The final close can happen after the other programs are done with it.</p>
<p>Then the override can be deleted.</p>
<p>Note that some adjustments might need to handle activation group details and possibly others.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: r.otto</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/combining-printer-files-from-multiple-programs-in-one-spool-file-in-a-job/#comment-92987</link>
		<dc:creator>r.otto</dc:creator>
		<pubDate>Tue, 07 Jun 2011 06:20:45 +0000</pubDate>
		<guid isPermaLink="false">#comment-92987</guid>
		<description><![CDATA[They are all COBOL pgms and are exactly the same for the printer file part:
Most lines printed are composed in the COBOL pgm and moved to a 132 character field in the PRTF.
&lt;pre&gt;
SELECT LRS460O ASSIGN TO FORMATFILE-LRS460O-SI
               ORGANIZATION IS SEQUENTIAL.
...
FD  LRS460O.
 01 LRS460O-REC.
    COPY DDS-ALL-FORMATS-O OF LRS460O.
...
OPEN OUTPUT LRS460O.
...
MOVE CORRESPONDING REC-REPORT-BUFFER TO LRS460O1-O.
WRITE LRS460O-REC FORMAT IS &quot;LRS460O1&quot;
INDICATORS ARE INDICATOREN.
ACCEPT REC-PRT-FEEDBACK FROM IO-FEEDBACK FOR LRS460O.
... and some more (similar) writes
CLOSE LRS460O.
&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p>They are all COBOL pgms and are exactly the same for the printer file part:<br />
Most lines printed are composed in the COBOL pgm and moved to a 132 character field in the PRTF.</p>
<pre>
SELECT LRS460O ASSIGN TO FORMATFILE-LRS460O-SI
               ORGANIZATION IS SEQUENTIAL.
...
FD  LRS460O.
 01 LRS460O-REC.
    COPY DDS-ALL-FORMATS-O OF LRS460O.
...
OPEN OUTPUT LRS460O.
...
MOVE CORRESPONDING REC-REPORT-BUFFER TO LRS460O1-O.
WRITE LRS460O-REC FORMAT IS "LRS460O1"
INDICATORS ARE INDICATOREN.
ACCEPT REC-PRT-FEEDBACK FROM IO-FEEDBACK FOR LRS460O.
... and some more (similar) writes
CLOSE LRS460O.
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/combining-printer-files-from-multiple-programs-in-one-spool-file-in-a-job/#comment-92978</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Tue, 07 Jun 2011 00:27:38 +0000</pubDate>
		<guid isPermaLink="false">#comment-92978</guid>
		<description><![CDATA[Assuming that LRS465B and the others are written in RPG, can you show us the F-specs for the LRS460O file in at least two of those programs?

Also, be aware that each of those programs may have OVRPRTF or DLTOVR commands inside of them.

Does the job end up with six spooled files named LRS460O? Or is it a number other than six? (And I see that the last character in the name is the letter &quot;O&quot; and not the digit &quot;0&quot;.)

Tom]]></description>
		<content:encoded><![CDATA[<p>Assuming that LRS465B and the others are written in RPG, can you show us the F-specs for the LRS460O file in at least two of those programs?</p>
<p>Also, be aware that each of those programs may have OVRPRTF or DLTOVR commands inside of them.</p>
<p>Does the job end up with six spooled files named LRS460O? Or is it a number other than six? (And I see that the last character in the name is the letter &#8220;O&#8221; and not the digit &#8220;0&#8243;.)</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: r.otto</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/combining-printer-files-from-multiple-programs-in-one-spool-file-in-a-job/#comment-92955</link>
		<dc:creator>r.otto</dc:creator>
		<pubDate>Mon, 06 Jun 2011 09:48:32 +0000</pubDate>
		<guid isPermaLink="false">#comment-92955</guid>
		<description><![CDATA[The job is submitted and it looks klike this:
some checks
&lt;pre&gt;
OVRPRTF    FILE(LRS460O) OUTQ(PDF)  +
                      OVRSCOPE(*JOB) +
                      SHARE(*YES) +
                      OPNSCOPE(*JOB)
&lt;/pre&gt;
next are some checks again (RTVDTAARA etc, but no DLTOVR nor a OVRPRTF)
then:
&lt;pre&gt;
CALL       PGM(LRS465B) PARM(&amp;PLPARM)
CALL       PGM(LRS466B) PARM(&amp;PLPARM)
CALL       PGM(LRS461B) PARM(&amp;PLPARM)
CALL       PGM(LRS462B) PARM(&amp;PLPARM)
CALL       PGM(LRS463B) PARM(&amp;PLPARM)
CALL       PGM(LRS464B) PARM(&amp;PLPARM)
&lt;/pre&gt;
There is no DLTOVR for the printe rfile after that.]]></description>
		<content:encoded><![CDATA[<p>The job is submitted and it looks klike this:<br />
some checks</p>
<pre>
OVRPRTF    FILE(LRS460O) OUTQ(PDF)  +
                      OVRSCOPE(*JOB) +
                      SHARE(*YES) +
                      OPNSCOPE(*JOB)
</pre>
<p>next are some checks again (RTVDTAARA etc, but no DLTOVR nor a OVRPRTF)<br />
then:</p>
<pre>
CALL       PGM(LRS465B) PARM(&amp;PLPARM)
CALL       PGM(LRS466B) PARM(&amp;PLPARM)
CALL       PGM(LRS461B) PARM(&amp;PLPARM)
CALL       PGM(LRS462B) PARM(&amp;PLPARM)
CALL       PGM(LRS463B) PARM(&amp;PLPARM)
CALL       PGM(LRS464B) PARM(&amp;PLPARM)
</pre>
<p>There is no DLTOVR for the printe rfile after that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/combining-printer-files-from-multiple-programs-in-one-spool-file-in-a-job/#comment-92645</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Thu, 26 May 2011 01:26:32 +0000</pubDate>
		<guid isPermaLink="false">#comment-92645</guid>
		<description><![CDATA[&lt;i&gt;The trick is to have the different programs call one program that stays open and does all the printer output.&lt;/i&gt;

Although that can work, it&#039;s not required. You can have multiple programs creating separate reports that result in a single spooled file. There is no need to call a single program to get it done.

But we need to see the controlling code (i.e., the CL that wraps around it all) to know possible reasons why it&#039;s not working in this case.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>The trick is to have the different programs call one program that stays open and does all the printer output.</i></p>
<p>Although that can work, it&#8217;s not required. You can have multiple programs creating separate reports that result in a single spooled file. There is no need to call a single program to get it done.</p>
<p>But we need to see the controlling code (i.e., the CL that wraps around it all) to know possible reasons why it&#8217;s not working in this case.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pdraebel</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/combining-printer-files-from-multiple-programs-in-one-spool-file-in-a-job/#comment-92603</link>
		<dc:creator>pdraebel</dc:creator>
		<pubDate>Wed, 25 May 2011 10:29:32 +0000</pubDate>
		<guid isPermaLink="false">#comment-92603</guid>
		<description><![CDATA[And do not close printer files ! That will cause different spools being created.]]></description>
		<content:encoded><![CDATA[<p>And do not close printer files ! That will cause different spools being created.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pdraebel</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/combining-printer-files-from-multiple-programs-in-one-spool-file-in-a-job/#comment-92602</link>
		<dc:creator>pdraebel</dc:creator>
		<pubDate>Wed, 25 May 2011 10:26:50 +0000</pubDate>
		<guid isPermaLink="false">#comment-92602</guid>
		<description><![CDATA[The trick is to have the different programs call one program that stays open and does all the printer output.]]></description>
		<content:encoded><![CDATA[<p>The trick is to have the different programs call one program that stays open and does all the printer output.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/combining-printer-files-from-multiple-programs-in-one-spool-file-in-a-job/#comment-92577</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Tue, 24 May 2011 20:17:14 +0000</pubDate>
		<guid isPermaLink="false">#comment-92577</guid>
		<description><![CDATA[&lt;i&gt;In the CL I call PgmA then PgmB then PgmC, etc....&lt;/i&gt;

In the CL, the code would look something like this:&lt;pre&gt;
ovrprtf     MyPrtF  +
              ovrscope( *JOB ) +
              share( *YES )          +
              opnscope( *JOB )
call  PgmA
call  PgmB
call  PgmC
dltovr      MyPrtF  lvl( *JOB )&lt;/pre&gt;
If that&#039;s not how your CL looks at that point, then show us what it looks like. For example, you can&#039;t be using {SBMJOB CMD(call PgmA)} in place of just plain {call PgmA}. And if the printer file isn&#039;t named MyPrtF in PgmA, PgmB and PgmC, then you have to use the actual printer file name instead of &quot;MyPrtF&quot;.

But if you can&#039;t make the CL work, we need to see what it looks like.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>In the CL I call PgmA then PgmB then PgmC, etc&#8230;.</i></p>
<p>In the CL, the code would look something like this:
<pre>
ovrprtf     MyPrtF  +
              ovrscope( *JOB ) +
              share( *YES )          +
              opnscope( *JOB )
call  PgmA
call  PgmB
call  PgmC
dltovr      MyPrtF  lvl( *JOB )</pre>
<p>If that&#8217;s not how your CL looks at that point, then show us what it looks like. For example, you can&#8217;t be using {SBMJOB CMD(call PgmA)} in place of just plain {call PgmA}. And if the printer file isn&#8217;t named MyPrtF in PgmA, PgmB and PgmC, then you have to use the actual printer file name instead of &#8220;MyPrtF&#8221;.</p>
<p>But if you can&#8217;t make the CL work, we need to see what it looks like.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: teandy</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/combining-printer-files-from-multiple-programs-in-one-spool-file-in-a-job/#comment-92576</link>
		<dc:creator>teandy</dc:creator>
		<pubDate>Tue, 24 May 2011 18:47:39 +0000</pubDate>
		<guid isPermaLink="false">#comment-92576</guid>
		<description><![CDATA[Make sure you do not have a DLTOVR command prior to programs B and C.  Also make sure that there is no previous OVRPRTF with SECURE(*YES) prior to running program A.

This seems to be rather an awkward way to do this.  Is there a reason that you can&#039;t put the data from these three programs into a database file?  Then you could either have a routine at the end of the third program print the data, or you could create a fourth program to do the printing.

It seems to me that this would lead to a cleaner and more maintainable job stream than what you are trying to do.]]></description>
		<content:encoded><![CDATA[<p>Make sure you do not have a DLTOVR command prior to programs B and C.  Also make sure that there is no previous OVRPRTF with SECURE(*YES) prior to running program A.</p>
<p>This seems to be rather an awkward way to do this.  Is there a reason that you can&#8217;t put the data from these three programs into a database file?  Then you could either have a routine at the end of the third program print the data, or you could create a fourth program to do the printing.</p>
<p>It seems to me that this would lead to a cleaner and more maintainable job stream than what you are trying to do.</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/8 queries in 0.013 seconds using memcached
Object Caching 395/396 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-06-20 04:17:50 -->