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

Separate spool files from the same program

In general applications, RPG print programs will generate a spool file with one or more pages. If you want to generate...

separate spool files from the single run of the program for each single page, or for a group of records, there is a way. By doing Closing and Opening of the Print file, or using FEOD Opcode you can do this. Every time Program Opens and Closes Printer file or executes FEOD command it closes the current spool file and opens the new spool file for the same printer file.

This technique can be use in a situation where the spool file is copied to a database file and then the database file is again spilt into more specific files. To avoid the hassle of splitting into specific files you can code the same logic into the main print program and split the spool file instead. And what you get is filtered data in separate spool files to be copied to different database files.

There can be many more uses for this technique.

Dig Deeper on RPG iSeries programming

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.