bvstone

Preparing Your Spooled Files for the Digital Age

Posted:

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



Latest Posts:

Create QRCODE in DDS Create QRCODE in DDS
Posted by September 21, 2018
Programming >> RPG Programming
Base64 Encoding a File with RPG Base64 Encoding a File with RPG
Posted by September 6, 2018
Programming >> RPG Programming
Building JSON with RPG and YAJL and Writing to Standard Output Building JSON with RPG and YAJL and Writing to Standard Output
Posted by August 31, 2018
Programming >> Proof of Concept (POC)
How to Delete Files or Empty Trash From Your Google Drive with your IBM i and RPG/ILE How to Delete Files or Empty Trash From Your Google Drive with your IBM i and RPG/ILE
Posted by July 24, 2018
BVSTools >> BVSTools Software Discussion >> GreenTools for G Suite (Google Apps) (G4G) Specific Discussion
GreenTools for G Suite (G4G) Updated to Include Delete and Empty Trash Function GreenTools for G Suite (G4G) Updated to Include Delete and Empty Trash Function
Posted by July 24, 2018
BVSTools >> BVSTools Announcements >> GreenTools for G Suite (Google Apps) (G4G) Specific Announcements
What to Do If Your License Keys Don't Work What to Do If Your License Keys Don't Work
Posted by July 18, 2018
BVSTools >> BVSTools Software Discussion
MAILTOOL Updated to Allow Failed Message on Invalid Recipient MAILTOOL Updated to Allow Failed Message on Invalid Recipient
Posted by May 20, 2018
BVSTools >> BVSTools Announcements >> eMail Tool (MAILTOOL) Specific Announcements
Non HTTPS Callbacks Removed from GreenTools for G Suite (G4G) Non HTTPS Callbacks Removed from GreenTools for G Suite (G4G)
Posted by April 15, 2018
BVSTools >> BVSTools Announcements >> GreenTools for G Suite (Google Apps) (G4G) Specific Announcements
IBM i Related Survey Available IBM i Related Survey Available
Posted by April 7, 2018
IBM Power Systems >> (QGPL) IBM i
BVSTools Releases Braintree Webhook Open Source Application - Node.js BVSTools Releases Braintree Webhook Open Source Application - Node.js
Posted by April 5, 2018
Programming >> Open Source
BVSTools Now Offering Web Services (BETA) BVSTools Now Offering Web Services (BETA)
Posted by April 3, 2018
BVSTools >> BVSTools Announcements
Creating a Reverse SSL Proxy Using RPG on the IBM i - Part 2 Creating a Reverse SSL Proxy Using RPG on the IBM i - Part 2
Posted by March 29, 2018
Programming >> Web Programming
Still on V7R1 or Earlier?  Here's Why You Should Upgrade NOW! Still on V7R1 or Earlier? Here's Why You Should Upgrade NOW!
Posted by February 21, 2018
IBM Power Systems >> (QGPL) IBM i
Converting a MMDDYY date format to YYMMDD for Sorting Using SQL Converting a MMDDYY date format to YYMMDD for Sorting Using SQL
Posted by February 16, 2018
Programming >> RPG Programming
Moving All Files from a Google Drive Folder to the Trash Using GreenTools for Google Apps (G4G) Moving All Files from a Google Drive Folder to the Trash Using GreenTools for Google Apps (G4G)
Posted by February 3, 2018
BVSTools >> BVSTools Software Discussion >> GreenTools for G Suite (Google Apps) (G4G) Specific Discussion

Reply




Copyright 1983-2018 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).