Preparing Your Spooled Files for the Digital Age


Preparing Your Spooled Files for the Digital Age

Spooled files.  They have been with us since we remember, and most likely will be for some time to come.  This is because they do everything for us from reporting to invoices to paychecks to purchase orders (and everything in between).

Having been offering a product to convert spooled files to PDF (or other formats) we know that taking spooled files to a “digital” format has been quite popular for the past few years.  Even IBM jumped on the "digital reporting" ship allowing their internal processes (OVRPRT, CPYSPLF, etc) to copy a spooled file directly to PDF.

But, in going digital that means that our old “analog” processes need some updating.  First and foremost should be separating and organizing the spooled files into a format that fits the digital age, and not the analog age.

Let me explain…

In the past when we would run an application that created a bunch of checks or invoices they were all done as one large spooled file.  This is because of the manual processes involved.  It just made sense to do it this way.

The process normally went something like this:

  1. Load the appropriate forms in the printer (ie, invoices, checks, etc)

  2. Print the large spooled file

  3. Manually separate the printed pieces (because these were normally perforated pre-printed forms)

But now, if we want to go digital this old process introduces a couple of problems.  

A lot of the applications available to convert spooled files to PDF (ours included) don’t have a method to manually separate spooled files the way that the printed forms would have been manually separated.  That is because this required user intervention.  The user needed to look at the large continuous ream of paper and physically tear at the appropriate place.

Separating by page number is available in most applications, but normally it's not one document per page as an invoice can be anywhere from 1 to many pages.

I have seen a couple document solutions that will allow you to put special characters into the spooled file that trigger a split, but if you’re going to go to that trouble, why not simply fix the problem correctly.

What I am proposing is quite simple.  For each “break”, whether it is check number, invoice number, customer number or PO number, close the spooled file, then open it again.  This will automatically create a separate spooled file at the appropriate break point.

The Old Way:

  1. Run application to generate one spooled file containing a group of invoices

  2. Load printer with invoice pre-printed forms

  3. Print the one large spooled file

  4. Separate each invoice

  5. Mail them to the customer

The Digital Way:

  1. Run the application to generate a group of invoices

  2. At each invoice number (or other break) close the spooled file, convert the *LAST spooled file to a digital format and do what you want with it (ie, email it, put it in the IFS, FTP it to a server, etc)

  3. Re-open the spooled file and repeat



Once you have these separate spooled files you’ll now have much more flexibility to do what you want with them.  Not only that, but instead of a manual process at the end of printing all the invoices to separate them, you can now process and distribute the invoice inline with the application process.


Here's a very simple example of what would be required.  If you're using the RPG Cycle and Lx indicators it may be even easier!  (Code left in columnar format for dramatic effect as that is most likely what most code that does this still looks like.)

FINVOICEPT O    E             PRINTER   
C                   IF        (INVNO <> OLDINVNO)    
C                   CLOSE     INVOICEPT
 * Here you could call a program to convert and email the invoice
C                   OPEN      INVOICEPT
C                   EVAL      OLDINVNO = INVNO
C                   ENDIF

So, don't ask for some proprietary, unreliable or clunky method to split up your spooled files when with a minimum of 2 lines of code you could do it yourself and do it the CORRECT way making your reports ready for the digital age and anything that may come your way.

Last edited 03/10/2015 at 08:26:02


Copyright 1983-2024 BVSTools
GreenBoard(v3) Powered by the eRPG SDK, MAILTOOL Plus!, GreenTools for Google Apps, jQuery, jQuery UI, BlockUI, CKEditor and running on the IBM i (AKA AS/400, iSeries, System i).