Tip

Convert spool file to image file

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:

CLRPGMMSG

SPL2TIFF

SPLF2TIFF

TIFF

==========================================================

Note:

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.


This was first published in October 2002

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.