Midrange News for the IBM i Community

Copy Spool File EXIT Program Published by: Bob Cozzi on 23 Apr 2012 view comments

COZSPLEXIT - Exit Program


The COZSPLEXIT is a CL program that may be used as an EXIT program on WRKSPLF, WRKJOB, and WRKOUTQ display panels. It adds an additional option, option C=Copy to those interfaces.

When an end-user types in option C next to a listed SPOOL file, the COZTOOLS CPYPRTF command is prompted with the SPLFNAME, OUTQ, SPLNBR and JOB information filled in from the original SPOOL file. The end-user may then specify a different output queue to which the SPOOL file is copied. Unlike option 2 (CHGxxxx) the CPYPRTF command actually copies the SPOOL file to the target OUTQ and (optionally) remote system.


The COZSPLEXIT program must be installed on your system by someone with proper authority to do so. There is an installation program named COZREGEXIT (Register COZTOOLS Exit Programs) that will run the exit program for you by running the ADDEXITPGM command featured below:

              FORMAT(LASP0100) PGMNBR(*HIGH)                    
              TEXT('Enable real COPY SPOOL FILE to another OutQ') 
              CRTEXITPNT(*YES) PGMDTA(*JOB 1 'C')
             /* The PGMDTA parm +              
              identifies the WRKSPLF, WRKOUTQ and WRKJOB option +  
              that evokes this Exit program. In this example, +    
              end-users type in option C to evoke this exit pgm. */

The is part of the COZTOOLS product for IBM i available for public beta testing beginning May 1st, 2012 and becoming available for general use in early August.


  • IBM i v5r4m0 (although it is not release dependent)


  • COZSPLEXIT - CL Program

Return to midrangenews.com home page.
Sort Ascend | Descend