Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Moving a spool file

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

  • Moving a spool file

    hi doug: i'm certain there are some more elegant ways of doing this, but i think we used WRKOUTQ output(*print) and then ran WRKSPLF output(*PRINT) across the queue information. we had a program that parsed out the printfile, after copying it to a data file. this is what did the move. easier than that is to do a CHGSPLFA to outq(ProperOutQ) AFTER the form has quit printing. just a piece of OLD home-grown code, that i dont remember all of the detail about. -bret myrick

  • #2
    Moving a spool file

    Doug Englander wrote: > Does anyone know how to have the system automatically move a spooled > print file to another OUTQ after the printer file has finished > printing? Automatically? No, but you could do slight modifications to a utility I wrote using the Spool File and User Space API's to do it via a command. The base utility I wrote was called MovSpl. It asks for the Outq to move from and Outq to move to. Only other parameter is to specify the spool file status' to be moved. It has a sister utility that deletes files based upon age. I'd imagine that a search of the MCPressOnline site might serve up something you can immediately download. Bill

    Comment


    • #3
      Moving a spool file

      knew somebody out there had a utility or two to be more elegant and efficient.... -bret myrick

      Comment


      • #4
        Moving a spool file

        Sorry, I can't get the post reply function to work, so I'm replying to Sarge instead of Doug just because this method works. I have two answers for you about how to automate this process: 1. I believe you can automate the processing of spool files in an output queue by regstering an exit program. It looks like the exit point QIBM_QHQ_DTAQ (Original Data Queue Server) would allow you to register a program that would run automatically as a spool file is placed in (added to) an output queue. Search for WRKREGINF and related topics at the iSeries (i5) Information Center to link to more information and how-to. I've registered exit programs for other functions, like SBMJOB (at QIBM_QCA_CHG_COMMAND = Change command exit programs), and have found this works out very well. Of course, this solution requires that you learn how to use the command ADDEXITPGM and that you write your own routines to query the database file that contains your spool file routing matrix. But an exit program is the way to make this process automatic. 2. If you don't want to do any programming, my company (www.smausa.com) has a powerful spool file management facility that is part of its OpCon/xps cross-platform scheduling system, built into the i5/OS agent. As you register your jobs in our Scheduling tool, you are offered an opportunity to specify how you want any spool file processed when that job finishes. You can copy from one output queue to another and route to multiple different users. Beyond the limits of i5/OS commands we support creation of multiple copies of a spool file in different output queues. Sorry for the blatant plug here, but our tools are for data centers that want pre-defined and automated operations, and it sounds like you are asking for this kind of solution. Hope you find this helpful. - George

        Comment


        • #5
          Moving a spool file

          Create a dataq then CHGOUTQ OUTQ(outq) DTAQ(libarary/dataq). This will add an data queue entry for each spool file added to the outq. You can then write a program to process the dtaq entries using the QRCVDTAQ Api. This very old article shows you how (you'll have to change the spool file number processing).

          Comment


          • #6
            Moving a spool file

            Jean-Jacques RISCH "TechTalk: Automatically move spooled files from one output queue to another." 4/1/96 12:01am. Sorry moved too fast.

            Comment


            • #7
              Moving a spool file

              we move all spoolfiles in a *SAV status to to a SVoutq(SV+name of original) via programs with overide of WRKOUTQ cmd to a physical file, read the file, move the spoolfile file to appropriate outq based on status. We run the program s every hour and after our weekly, monthly, yearly, etc, reports print. pgm1 calls pgm2 with all the outq names needed once per outq PGM2 dumps contents of outq to a file (SPFDTA CHAR 132 132 1 ) is file description use pgm3(rpg) to read the file a data structure to get all the file attributes and and call a PGM4(CLLE) to chgsplfa to where you need it saved. It may not be modern code but it has worked for a long time and we are happy with it. code below is not exact but it should get you there with a little work if you choose to use it.
              Code

              Comment


              • #8
                Moving a spool file

                The article posted provides a good example. I've used the Dtaq technique at several clients for years and it works great. Reason I needed it was that the clients had specific forms (in OCL) that were to print on specific printers. What I did was: -create a file that is keyed on formtype and contains desired outq, optional formtype to change to, and optional backup outq -create default outq with dtaq attached -run a CL pgm that runs 24x7 that receives dtaq entries (as an autostart job in QUSRWRK) -change user job descriptions to point to the default outq -when a spool goes to RDY status, my CL pgm checks the formtype, then a pgm retrieves the formtype record that contains what printer to print on, changes formtype if needed, and whether to save a copy and what outq to save the copy to. Everything is automatic. If a printer is down, the operator can temporarily route the desired form(s) to another printer w/o any pgm changes.

                Comment


                • #9
                  Moving a spool file

                  Sorry, I add code into message section and nobody can read. Please find the code. Thanks
                  Code

                  Comment


                  • #10
                    Moving a spool file

                    http://www.itjungle.com/fhg/fhg022107-story03.html

                    Comment


                    • #11
                      Moving a spool file

                      Does anyone know how to have the system automatically move a spooled print file to another OUTQ after the printer file has finished printing? For instance, there are some reports that get generated that need to be saved for awhile. I'd like the spool writer or system call a program or something when a spool file job completes printing. When the called program gets executed, it would somehow interrogate a user file to see if the spool file just printed needed to get archived. If so, the system would run a command to move the spool file from the production OUTQ to a archived OUTQ. Has anyone done something like this? This has to be done because our operator "forgets" to move the specific reports to the archive outq, and the reports are purged. After they get purged, then the user decides they need a reprint, or discovers that they have lost the report or never received it. Thanks, Doug

                      Comment


                      • #12
                        Moving a spool file

                        Hi Doug: Here's a simple idea that doesn't require programming. Send the specific spooled files you want archived to a remote outq first which will automatically send those spooled files to your normal printer outq. Specify, SAVE(*Yes) when moving the spooled files (or in the print file) which will archive them on the remote outq. If you need to reprint, just release the spooled file on the remote outq, no need to move it. The remote outq option is very versatile since it can point to another outq on a remote system or on your local system. Example: 1. Create the remote outq ARCHIVE to print to PRT01. CRTOUTQ OUTQ(QUSRSYS/ARCHIVE) RMTSYS(your local system name) RMTPRTQ('QUSRSYS/PRT01') CNNTYPE(*IP) TRANSFORM(*NO) TEXT('Archive Remote Outq') 2. Start the remote writer on the outq. STRRMTWTR (QUSRSYS/ARCHIVE) You may need/want to add this command to your system startup job. 3. Printing: Move your spooled files to the ARCHIVE outq and save(*yes) or change the required print files (CHGPRTF) to automatically route them to the ARCHIVE outq and save(*yes). Kent

                        Comment

                        Working...
                        X