There has always been a need to convert spool file into PC supported file for many reasons.
It may be for electronic transmission of spool file or maintaining record of the iSeries report in a PC or providing the iSeries report to someone in a floppy or at least for a programmer to view the iSeries report in a PC without wasting paper.
There are different techniques to convert a spool file to PC-based files. But most of the techniques had a limitation of handling only *SCS type spool files.
The AFP Viewer was a solution for viewing *AFPDS spool files. But this doesn't solve the need for an e-transmission of AFPDS spool files as an e-mail attachment.
The Host Print Transform API QWPZHPT1 is the solution for converting spool files (including AFPDS) into PC-based file(TIFF -Tage Image File Format). There is a lot of information about this API in IBM System Reference API manual SC41-5874-03. But the information in the manual is not complete to achieve the conversion. The Print Data Stream TIFF_G4 provides the final solution for converting Spool File to TIFF File. Basically a Work Station customization object should be created with TIFF_G4 Data stream and this *WSCST should be specified in the Host Print Transform API to achieve the conversion.
Here is the source for achieving Spool File to TIFF conversion. The converted TIFF file can then be sent as an e-mail attachment using SNDDST command.
Click on the following programs:
This command will not work for *SCS spool files.
The Command should be issued in the following format:
SPL2TIFF FILE(spoolfile) JOB(Jobnumber/Username/Jobname) SPLNBR(1) TOTIFF ('/MyFolder/anyname.tif')
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.