The only thing I would suggest from a cursory look is to remove all the
override to print file commands until just before the copy file command. 
I can think of no reason why the copy spool file command would not place a
control character into the first position of the data file.
Have you tried the process from a command line?
Gregory A. Garner
Garner Data Systems, Inc
4270 Grand Teton Parkway
Suwanee, GA 30024
p - 770.845.9636  f - 770.614.3496
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Michael Rosinger
Sent: Thursday, January 03, 2008 8:00 AM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: looking for recommendations on report merge product...
"Roger Harman" <RHarman@xxxxxxxxxx> wrote in message
news:mailman.5.1199314269.25518.midrange-l@xxxxxxxxxxxxxxx
I've done this too over the years for archiving reports for fiching,
burning to CD and later respooling.  Works fine w/*FCFC.  As noted, be
sure your PF is 1 longer than SPLF width.
Gregory/Roger,
OK. I found the CL that the Operations person had been experimenting with
for this. I made (what I think are) the appropriate changes based on your
suggestions. Not only is it not working but the first (left-most) character
of the report is being truncated. I am not sure what I am missing. See if
you see the problem.
The CL appears below. Please note that *PRTF CCIPRTF01 is defined as
PAGESIZE(66 132 *ROWCOL). Both programs CRP130 and CRP140 write to printer
file CCIPRTF01.
 QRYGAIL:    PGM        PARM(&DATE &STARTSTEP &ENDSTEP)
             DCL        VAR(&DATE) TYPE(*CHAR) LEN(10)
             DCL        VAR(&STARTSTEP) TYPE(*CHAR) LEN(10)
             DCL        VAR(&ENDSTEP) TYPE(*CHAR) LEN(10)
             DCL        VAR(&USR_RC) TYPE(*DEC) LEN(8 0) VALUE(0)
             /* Global Monmsg:  take control of any called program's
unhandled exceptions */
             MONMSG     MSGID(CEE9901) EXEC(GOTO CEE9901)
             
             /* create PF to hold cpysplf entries until all pgms have run */
             DLTF       FILE(QTEMP/QRYGAILSPL)
             MONMSG     MSGID(CPF2105) /* CONTINUE IF FILE NOT FOUND */
             CRTPF      FILE(QTEMP/QRYGAILSPL) RCDLEN(133) MAXMBRS(*NOMAX)
 CRP140:     /* point CCIPRTF01 to a unique splfname */
             IF         COND(&DATE *EQ ' ') THEN(DO)
                CALL       PGM(CRP140)
             ENDDO
             ELSE       CMD(DO)
                CALL       PGM(CRP140) PARM(&DATE)
             ENDDO
             CALL       PGM(GET$RC) PARM(&USR_RC)
             IF         COND(&USR_RC *NE 0) THEN(GOTO ERROR)
             /* extract report to PFM */
             CPYSPLF    FILE(CRP140) TOFILE(QTEMP/QRYGAILSPL)
TOMBR(QRYGAILSPL) +
                        MBROPT(*REPLACE) CTLCHAR(*FCFC)
 CRP130:     /* redirect CCIPRTF01 to a new unique splfname */
             CALL       PGM(CRP130)
             CALL       PGM(GET$RC) PARM(&USR_RC)
             IF         COND(&USR_RC *NE 0) THEN(GOTO ERROR)
             /* extract report to PFM */
             CPYSPLF    FILE(CRP130) TOFILE(QTEMP/QRYGAILSPL)
TOMBR(QRYGAILSPL) +
                        MBROPT(*ADD) CTLCHAR(*FCFC)
 COMMONEND:  /* redirect CCIPRTF01 back to original */
             OVRPRTF    FILE(CCIPRTF01) USRDTA(QRYGAIL) SPLFNAME(QRYGAIL) +
                        OUTQ(MNR) CTLCHAR(*FCFC)
             /* now copy the PF member back to a printer file
*/
             CPYF       FROMFILE(QTEMP/QRYGAILSPL) TOFILE(CCIPRTF01) +
                        FROMMBR(QRYGAILSPL)
             GOTO       ENDPGM
 CEE9901:    SNDPGMMSG  MSG('MSG CEE9901 CAPTURED:  ABEND OF CALLED PROGRAM
+
                          DETECTED')
             GOTO       ERROR
 ERROR:      CALL       PGM(CCIABNDCL) PARM('QRYGAIL' &USR_RC 'N')
 ENDPGM:     ENDPGM
As an Amazon Associate we earn from qualifying purchases.