Problem solve Get help with specific problems with your technologies, process and projects.

Keeping spool files open

Here's a simple way to free up the spool file for printing.

Our warehouse has a dedicated printer for B/L's (Bill's of Lading) and when they needed have one printed, they had to select the process off a menu, key in an order number and then exit the program, only to have to go back into the program seconds later. They wanted to keep the program open, but programmatically, this would not 'release' the spool file. To get around this, I literally defined the spool file in the RPG program as a user-defined open file and within the looping code. I would open and close the file, which would free up the spool file for printing.


 
  
FPORECEIV  O    E             PRINTER OFLIND(*IN97)
F                                         USROPN


 C                   CLOSE     PORECEIV
 C                   Exfmt     PromptSc    (Code to prompt operator for PO #
and to format the report)
 C                   OPEN      PORECEIV

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: tips, tutorials and more.

Ask your programming questions--or help out your peers by answering them--in our live discussion forums.

Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.

Dig Deeper on iSeries CL programming

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close