× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



   Re:I did this, but received an MCH3601= error when the program
   was called with the parameter set to not-first-t= ime.  The error was on
   an
   initialize statement of the printer file = record 01 level after the FD.

   How are= you ending the COBOL program?
   How you end it would determine whe= ther the printer file is closed upon
   exiting the program or kept open.
   <= BR>
   Thank you,

   Karen Hodge
   Senior System Analyst
   Genesys He= alth System
   1000 Healthpark Blvd, Grand Blanc, Mi 48439
   Office 810.60= 6.5180, Fax 810.606.7204
   khodge@xxxxxxxxxxx
   -----cobol400-l-bounces@xxxxxxxxxxxx wrote: -----

   <bloc= kquote style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT:
   5px; BO= RDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">To: "COBOL
   Programming on = the iSeries/AS400" <cobol400-l@xxxxxxxxxxxx>
   From: "Greg Phillips"= <gphillips@xxxxxxxxxxxxxxx>
   Sent by: cobol400-l-bounces@midrange.= com
   Date: 03/18/2005 06:25PM
   Subject: RE: [COBOL400-L] Multiple Repor= ts in One Spooled File

   Thanks, Karen= .  I did this, but received an MCH3601 error when the
   program
   was c= alled with the parameter set to not-first-time.  The error was on
   an<B= R>initialize statement of the printer file record 01 level after the
   FD.<BR= >Apparently, the printer file was closed, even though the program
   didn't<BR= >explicitly do it.  I'll have to put the program into debug and
   see if= I can
   figure out how the printer file is getting closed.

   Greg Ph= illips
   Senior Programmer/Analyst
   Zenith Administrators
   221 Main St= reet, Suite 250
   San Francisco, CA 94105
   Phone: (415) 536-8232  F= ax: (415) 227-0552
   E-mail: gphillips@xxxxxxxxxxxxxxx mailto:gphillips@xxxxxxxxxxxxxxx<= /A>>
   Zenith's Website: www.zenithadmin.com http://www.zenithadmin.com/>

   C= ONFIDENTIALITY NOTICE: This e-mail message, including any attachments,
   is<B= R>for the sole use of the intended recipient(s) and may contain
   confidentia= l
   and privileged information.  Any unauthorized review, use, disclo= sure or
   distribution is prohibited.  If you are not the intended re= cipient,
   please
   contact the sender by reply e-mail and destroy all copie= s of the
   original
   message.

   -----Original Message-----
   From= : cobol400-l-bounces@xxxxxxxxxxxx
   [mailto:cobol400-l-bounces@xxxxxxxxxxxx]On= Behalf Of Karen L
   Hodge/MIS/Genesys
   Sent: Friday, March 18, 2005 1:4= 5 PM
   To: COBOL Programming on the iSeries/AS400
   Subject: RE: [COBOL40= 0-L] Multiple Reports in One Spooled File

   I have= used this same type of logic to accomplish the same thing (adding
   to
   a = spool file) using
   'regular' COBOL.
   Doesn't have to be ILE.
   Just pa= ss the first-time, not-first-time and end switch as a parm in the
   CL
   and= pass it to the COBOL program.
   Then condition your open and close on the= switch.

   Thank you,

   Karen Hodge
   Senior System Analyst<= BR>Genesys Health System
   1000 Healthpark Blvd, Grand Blanc, Mi 48439
   = Office 810.606.5180, Fax 810.606.7204
   khodge@xxxxxxxxxxx

   =             "Greg Phillips"
       =         <GPHILLIPS@ZENITH
         &nbsp= ;     admin.com>             &nb= sp;                     &   
nbsp;             To
         =       Sent by:             &nb= sp;    "COBOL Programming on the
           &= nbsp;   cobol400-l-bounce         iSeries/AS400"<B= R>
     s@xxxxxxxxxxxx     &n= bsp;      <COBOL400-L@xxxxxxxxxxxx>
         =                     &nbsp= ;                     &nb= sp;
               &= nbsp;cc

               03/18/2005 04:33 &= nbsp;                        Subject
     &= nbsp;         PM           &nb= sp;            RE: [COBOL400-L]
   Multiple Repo= rts
                     &nbsp= ;                   in One Spo= oled File

               Please respond t= o
               COBOL Programming
     =                on the
     &nb= sp;           iSeries/AS400
       &nbsp= ;       <COBOL400-L@MIDRA
           &nb= sp;       nge.com>

   Thanks for = the reply, Patrick.  I'm unfamiliar with ILE other than some
   vague = notions of creating non-executable modules, perhaps binding them
   togethe= r, and then creating an executable object.  This will give me a
   good<B= R>excuse to start learning about ILE.  Thanks again.

   - Greg
      -----Original Message-----
   From: cobol400-l-bounces@xxxxxxxxxxxx
   = [mailto:= cobol400-l-bounces@xxxxxxxxxxxx]On Behalf Of Patrick L
   Archibald
   Sen= t: Friday, March 18, 2005 11:50 AM
   To: COBOL Programming on the iSeries/= AS400
   Subject: Re: [COBOL400-L] Multiple Reports in One Spooled File
   
   Greg

   If you don't mind ILE the following works:

   &nbsp= ;PGM

               CALLPRC    = PRC(MULTIOPEN) PARM('0')

               C= ALLPRC    PRC(MULTIOPEN) PARM('1')

         &n= bsp;     CALLPRC    PRC(MULTIOPEN) PARM('1')

   &nb= sp;           CALLPRC    PRC(MULTIOPEN) = PARM('1')

               CALLPRC   &= nbsp;PRC(MULTIOPEN) PARM('1')

             &nb= sp; CALLPRC    PRC(MULTIOPEN) PARM('1')

       &nbs= p;       CALLPRC    PRC(MULTIOPEN) PARM('1')
   <B= R>            CALLPRC    PRC(MULTIO= PEN) PARM('2')

               endpgm
   <= BR>

         PROCESS APOST.

         = IDENTIFICATION DIVISION.

         PROGRAM-ID. MULTIOPEN.
         AUTHOR. PLA.

         DATE-= WRITTEN. 03/18/2005.

        *

       &nbs= p;*  Test.

        *

         EN= VIRONMENT DIVISION.

         CONFIGURATION SECTION.
   <= BR>      SOURCE-COMPUTER. IBM-AS400.

       &n= bsp; OBJECT-COMPUTER. IBM-AS400.

         SPECIAL-NAMES.= I-O-FEEDBACK IS PRINTER-FEEDBACK.

         INPUT-OUTPUT= SECTION.

         FILE-CONTROL.

     &= nbsp;       SELECT OPF-PRINT

         &nb= sp;          ASSIGN FORMATFILE-MULTIOPEN-SI
   <BR= >                 FILE STATUS = WS-FILE-STATUS.

         DATA DIVISION.

   &nbsp= ;     FILE SECTION.

         FD  OPF-= PRINT.

         01  OPR-PRINT.

      =       COPY DDS-ALL-FORMAT OF MULTIOPEN.

     &= nbsp;   WORKING-STORAGE SECTION.

         01  = WS-FILE-STATUS                PIC X= (02).

         01  WS-FIRST-TIME-INDIC   &= nbsp;       PIC S9(01) VALUE 1.

         = 01  WS-FEEDBACK.

             05  FI= LLER                    P= IC X(144).

             05  WS-CURRENT-PR= INT-LINE     PIC S9(02) COMP-4.

         0= 1  INDIC-AREA.

             05  IN01=  INDIC 01            PIC 1.

   =       LINKAGE SECTION.

         01  = LS-FIRST-TIME-INDIC           PIC S9(1).

   &n= bsp;         88 FIRST-TIME         =         VALUE 0.

           &nb= sp; 88 NOT-FIRST-TIME             VALUE 1.<BR= >
             88 LAST-TIME       &= nbsp;          VALUE 2.

       &= nbsp; PROCEDURE DIVISION USING LS-FIRST-TIME-INDIC.

       &n= bsp; OPENING-PARAGRAPH.

             IF FIRST-= TIME

                 OPEN OUTPUT OP= F-PRINT

             END-IF.

     &nb= sp;       WRITE OPR-PRINT

          =         FORMAT 'HEADER1'

         &= nbsp;         INDIC INDIC-AREA

       &nb= sp;     END-WRITE.

             IF L= AST-TIME

                 CLOSE OPF-= PRINT

             END-IF.

     &nbsp= ;       GOBACK.

   Thanx, PLA

   Greg Ph= illips wrote:

   >I've seen this problem discussed, but not by anyon= e who actually solved
   it
   >in a CL that calls COBOL/400 programs. &nbs= p;I have a CLP that CALLs a
   COBOL/400
   >program multiple times in a= loop.  The loop basically consists of an
   >OVRPRTF, a CALL to th= e COBOL program, and a DLTOVR.  Each iteration
   creates
   >a sep= arate spooled file.
   >
   >I'd like the report output from each ite= ration to go into a *single*
   spooled
   >file.  I've moved the O= VRPRTF outside of the loop to before the loop
   gets
   >executed, used SH= ARE(*YES) and then did my iterations.  I still
   received
   >separat= e spooled files.
   >
   >I also tried OPNSCOPE(*JOB) by itself and w= ith OVRSCOPE(*JOB) with no
   >success.  I changed the COBOL progra= m to either OPEN or CLOSE or do
   neither
   >with the printer file. &n= bsp;All I discovered for my trouble was that
   you need
   to
   >explicit= ly OPEN the printer file in the program in order to use it.
    That
   &= gt;makes sense.
   >
   >So if anyone has actually used CL and COBOL/= 400 to direct printed
   output
   >from multiple CALLs of a COBOL program = into a single spooled file,
   please
   >tell me how you did it!  Tha= nks!
   >
   >- Greg Phillips
   >__________   _________________________   ____________
   >This is the COBOL Programming o= n the iSeries/AS400 (COBOL400-L) mailing
   list
   >To post a message e= mail: COBOL400-L@xxxxxxxxxxxx
   >To subscribe, unsubscribe, or change l= ist options,
   >visit: http://lists.midrange.com/mailman/listin= fo/cobol400-l
   >or email: COBOL400-L-request@xxxxxxxxxxxx
   >B= efore posting, please take a moment to review the archives
   >at http://archiv= e.midrange.com/cobol400-l.
   >
   >
   >

   ____   _________________________   __________________
   This is the COBOL= Programming on the iSeries/AS400 (COBOL400-L) mailing
   list
   To post a= message email: COBOL400-L@xxxxxxxxxxxx
   To subscribe, unsubscribe, or ch= ange list options,
   visit: http://lists.midrange.com/mailman/list= info/cobol400-l
   or email: COBOL400-L-request@xxxxxxxxxxxx
   Before = posting, please take a moment to review the archives
   at http://archive.midrange= .com/cobol400-l.

   _____________   _________________________   _________
   This is the COBOL Programming on the iSeries= /AS400 (COBOL400-L) mailing
   list
   To post a message email: COBOL400-L@= midrange.com
   To subscribe, unsubscribe, or change list options,
   visit= : http://lists.midrange.com/mailman/listinfo/cobol400-l
   or = email: COBOL400-L-request@xxxxxxxxxxxx
   Before posting, please take a mom= ent to review the archives
   at http://archive.midrange.com/cobol400-l.
   <B= R>

   _____________________   _________________________   _
   This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mail= ing
   list
   To post a message email: COBOL400-L@xxxxxxxxxxxx
   To subscrib= e, unsubscribe, or change list options,
   visit: http://lists.midr= ange.com/mailman/listinfo/cobol400-l
   or email: COBOL400-L-request@mi= drange.com
   Before posting, please take a moment to review the archives<B= R>at ht   
tp://archive.midrange.com/cobol400-l.

   ______   _________________________   ________________
   This is the COBOL Progr= amming on the iSeries/AS400 (COBOL400-L) mailing
   list
   To post a message = email: COBOL400-L@xxxxxxxxxxxx
   To subscribe, unsubscribe, or change list= options,
   visit: http://lists.midrange.com/mailman/listinfo/cobo= l400-l
   or email: COBOL400-L-request@xxxxxxxxxxxx
   Before posting, = please take a moment to review the archives
   at http://archive.midrange.com/cobo= l400-l.

   

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.