With SPLTOOL you are able to merge two or more *SCS or *AFPDS (AFPTOOL Required for *AFPDS) spooled files into the PDF formats. Merging can be performed one of two ways. Each way is described below as well some important notes to remember when merging spooled files.
The first method used to merge spooled files into one document is using the SPLTOOL "Batch" comands. These commands consist of the following:
The Batch commands will allow you to select and process one or more spooled files in one command. By default, each spooled file processed will be placed into it's own seperate file. Using the MERGE(*YES) parameter on any of these commands will instead copy all of the data into one resulting document.
When using the MERGE(*YES) option with the batch commands you must also specify the Only File Name (ONLYF) parameter as *YES, and then specify a file name on the File Name (FNAME) parameter.
An example of using the command to copy all spooled files in output queue REPORTS with a user data containing the value COPY to a PDF document named "/myfiles/reports/allreports.pdf" is as follows:
It is also possible to merge two or more spooled files into one document manually using the normal single file processing comands. These commands are as follows:
In order to merge spooled files manually in this fasion you must use the MERGE parameter specifying a specific value for the first, all other spooled files, and the last spooled fie in the group. All commands must be run sequentially in the same job and the order that the spooled files are merged will be the order that the spooled files are processed.
For the first spooled file, you must specify MERGE(*FIRST) on the command. For all other spooled files you must specify MERGE(*YES). Then, one final time you must call the command with the same information as the last spooled file and specify MERGE(*LAST). This will trigger the command to merge all spooled files in the group and create the resulting document.
The following example will merge three spooled files into one PDF document named "/myfiles/reports/allreports.pdf":
Notice that the last command is a duplicate of the previous, but *LAST is specified for the MERGE parameter. This last command is used to send information to the SPLTOOL command to finish processing and merge all the spooled files previously listed.
When merging spooled files it is important to remember the following items: