ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Duplicating Spool files from an OUTQ

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

  • Duplicating Spool files from an OUTQ

    I have been tasked with creating a process of duplicating spool files from one outq to another. There are 2 scenarios that I need to deal with.

    An on Demand process that creates a spool file of a bill. This process I put code in the CL to CPYSPFL to a flat file then overide the print file then copy the flat file back to the outq that I need it top be in for feeding another system.

    CPYSPLF FILE(qsysprt) TOFILE(tstbsydtaa/BILLDET) +
    SPLNBR(*LAST) CTLCHAR(*FCFC)
    OVRPRTF FILE(laserarc) CTLCHAR(*FCFC)
    CPYF FROMFILE(TSTBSYDTAA/BILLDET) TOFILE(laserarc)

    This works perfectly.

    The second procecess is a bit more complicated. The batch process potentially creates multiple types of spools files. My dilema is determining spool file(s) that I need and selecting them. In the on demand process it is easy because I can use *LAST. Here I need to be more specific.

    File User User Data Sts Pages

    BPBC92T1 BSYPGMR BPBC92 HLD 2
    QSYSPRT BSYPGMR BPBC51 HLD 4



    These are the 2 spools that I need to copy. They may or may not bothe be created in the job.


    Any thoughts?

    Thanks.

  • #2
    Re: Duplicating Spool files from an OUTQ

    hey big guy...follow this link




    jamie
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

    Comment


    • #3
      Re: Duplicating Spool files from an OUTQ

      Thank you.....

      I need to find a copy of that guide.!

      Comment


      • #4
        Re: Duplicating Spool files from an OUTQ

        you cant read it its written in a special language for geeky dorks like me...
        All my answers were extracted from the "Big Dummy's Guide to the As400"
        and I take no responsibility for any of them.

        www.code400.com

        Comment


        • #5
          Re: Duplicating Spool files from an OUTQ

          LOL Sort of figured that... Us DORKS Need a pecla bound version.

          Comment


          • #6
            Re: Duplicating Spool files from an OUTQ

            let me know if all is okay with the sample .....at the bottom of the thread..
            I posted a zip file (its a save file)

            jamie
            All my answers were extracted from the "Big Dummy's Guide to the As400"
            and I take no responsibility for any of them.

            www.code400.com

            Comment


            • #7
              Re: Duplicating Spool files from an OUTQ

              This works wonderfully, just pass the spoolfile number (you can get this from your calling program) as a parameter to it.
              Regards

              Kit
              http://www.ecofitonline.com
              DeskfIT - ChangefIT - XrefIT
              ___________________________________
              There are only 3 kinds of people -
              Those that can count and those that can't.

              Comment

              Working...
              X