Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Duplicate spool file.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Duplicate spool file.

    If you have TAATOOLS, there is a command DUPSPLF that does what you want.

  • #2
    Duplicate spool file.

    Create user space QUSCRTUS get spool file QSPOPNSP get the data QSPGETSP close spool file QSPCLOSP change spool file QUSRSPLA create spool file QSPCRTSP put spool file QSPPUTSP close spool file QSPCLOSP delete user space QUSDLTUS

    Comment


    • #3
      Duplicate spool file.

      Create a file in qtemp 1 char larger than print line length. Use CPYSPLF to copy last spool file (or any other spool file within job) and use control *FCFC. Use an OVRPRTF (for the print file) to the other queue and control char *FCFC and then use CPYF from qtemp file to print file.

      Comment


      • #4
        Duplicate spool file.

        Sorry that I am getting to this late but here is how you accomplish your goal. 1) Obtain the length of the spool file from the spool file attributes using the API QUSRSPLA. You can call this API from a CL program. It is not very difficult. 2) Create a physical file that is one character longer than the spool files length attribute. 2a) CRTPF FILE(QGPL/NEWPF) RCDLEN(spool length + 1) 3) Create (or use) a printer file object with the same length as the spool file length from step one. 3a) CRTPF FILE(QGPL/NEWPRTF) PAGESIZE(spool length/spool width) CTLCHAR(*FCFC) OUTQ(new out queue) **Note: other parameters may be required to exactly match the original spool file object. 3b) or CRTDUPOBJ OBJ(original spool file) FROMLIB(*LIBL) OBJTYPE(*FILE) TOLIB(QGPL) NEWOBJ(NEWPRTF) .................................................. .............. CHGPRTF FILE(QGPL/NEWPRTF) CTLCHAR(*FCFC) OUTQ(new out queue) I like method 3b personally. 4) CPYSPLF FILE(SPOOLDATA) TOFILE(NEWPF) CTLCHAR(*FCFC) Note: You may need to add parameters to uniquely identify the spool file. 5) CPYF FILE(NEWPF) TOLFILE(NEWPRTF) Your done but you should clean up the created objects for the next time you run the program. Steve

        Comment


        • #5
          Duplicate spool file.

          System iNetwork - AS/400 ( AS400 ), iSeries, and i5 news, products, technical help DUPCHGSPLF (Duplicate and Change Spool File) Utility Article Information Article ID: 15870 Pub: Club Tech Systems Management Tips Newsletter Date: January 07, 2003 There are several ways to duplicate a spool file: * Use CPYSPLF to copy it to a physical file, then using CPYF to copy back to another spool file. * Use the SNDNETSPLF command. * Use the SNDTCPSPLF command. Another method has been posted in the iSeries Network forums by prolific utility author Herman Van der Staey. His DUPCHGSPLF utility not only duplicates spool files, but also expands the number of spool attributes you can change beyond those offered by the CHGSPLFA (Change Spooled File Attributes) command. Here's a sample DUPCHGSPLF command: DUPCHGSPLF JOB(123456/QSYSOPR/BACKUP) SPLFILE(QPJOBLOG) + SPLNBR(*LAST) LPI(8) CPI(12) FONT(*CPI) PAGRTT(90) + OUTQ(MYLIB/MYOUTQ) DRAWER(2) OUTBIN(3) + NEWUSER(JOE) NEWSPLNAME(BACKUPLOG) The source code for DUPCHGSPLF, along with an explanation of the other methods to duplicate a spool file, are available at http://www.iseriesnetwork.com/Forums...ID=30314&mc=16. There's also at least one shareware utility available to duplicate files: Duplicate Spooled File (SPL2SPL) BVS Tools http://www.bvstools.com/spl2spl.html .. Penton Technology Media Copyright © 2007 - Penton Technology Media System i is a trademark of International Business Machines Corporation and is used by Penton Media, Inc., under license. SystemiNetwork.com is published independently of International Business Machines Corporation, which is not responsible in any way for the content. Penton Media, Inc., is solely responsible for the editorial content and control of the System iNetwork.

          Comment


          • #6
            Duplicate spool file.

            Currently on V5R4. Need to duplicate spool file to another outq. Thanks in advance. L. Swain

            Comment


            • #7
              Duplicate spool file.

              Another way, maybe easiest of all. Use the SNDNETSPLF command to send the print file to a user with the desired target queue as it's default print queue. - The sender and reciever have to be enrolled in the system directory - Use the commands WRKDIRE and ADDDIRE to do this. - Use DTAFMT(*ALLDATA) if this is not the default. Colin

              Comment


              • #8
                Reuplicate spool file.

                Guest.Visitor wrote:
                Create a file in qtemp 1 char larger than print line length. Use CPYSPLF to copy last spool file (or any other spool file within job) and use control *FCFC. Use an OVRPRTF (for the print file) to the other queue and control char *FCFC and then use CPYF from qtemp file to print file.
                I'd recommend using this duplicate file removal utility to deal with it. It has many built-in functions and is useful in many cases.

                Comment


                • #9
                  Reuplicate spool file.

                  You could do a SNDNETSPLF to yourself. Then a duplicate of the spool file will be in your outq of the user you sent it too. Easy program to write.

                  Comment


                  • #10
                    Reuplicate spool file.

                    I use another programme to delete duplicate files, which is called Clone Remover. How to choose a good duplicate file finder? To my mind the main thing is efficiency of it. It must do its job. That's why I clen my PC with the help of such one

                    Comment

                    Working...
                    X