Spool and Print Tools in Library QUSRTOOL
There are tools in QUSRTOOL that use some of the spooled file and print APIs. To show how to use these APIs, source code for these tools is provided in the examples.
These tools use most of the spooled file and print APIs discussed in this part. Additionally, some CL commands are used in the tools.
The tools are:
- Save and restore spooled files (SAVRSTSPLF) tool
This tool uses the following spooled file APIs:
- QSPCLOSP
- QSPCRTSP
- QSPGETSP
- QUSLSPL
- QUSRSPLA
- QSPOPNSP
- QSPPUTSP
It also makes use of the following save and restore APIs:
- QSRSAVO
- QSRRSTO
- Transform AFP™ to ASCII data stream (TRNAFP) tool
This tool uses the QWPZTAFP print API.
- Customized separator page exit program (QSPBLSEP) example
This example of the customized print separator exit program builds program QSPBLSEP. QSPBLSEP can be used to generate data for separator pages.
- Page range support exit program (TSPRWPR) example
This example of the Writer Transform exit program provides page range support for remote writers and CL commands Send TCP/IP Spooled File (SNDTCPSPLF) and LPR.
- LPR Print driver exit program (TSPLPRD) example
This example of the Print Driver exit program provides the function of sending spooled files from an output queue to an ASCII printer device which is attached to an LPD server.
- Spool user-defined UIM list options program (TSPUIML) example
This example of a spool user-defined UIM list options exit program provides the function to invoke the SNDTCPSPLF (S) or CPYSPLF (C) CL commands for a particular spooled file simply by keying a 'S' or 'C' next to a spooled file entry when displaying the list panel for WRKOUTQ, WRKSPLF, or WRKJOB OPTION(*SPLF).
- Copy Code Page to Library program (CPYCPTOLIB) example
This example of a command and program can be used to create font resource objects, attribute CDEPAG, from code pages stored in the integrated file system in /QIBM/UserData/OS400/Fonts/codepages.
This tool uses the following APIs:
- QlgStat
- QMHSNDPM
- QtqIconvOpen
- iconv
- iconv_close
- Qp0lProcessSubtree
A description of each of these tools can be found in a member of file QATTINFO. Shown below is a list of these members.
- CPYCPTOLIB is described in member TSPCPYCI.
- QSPBLSEP is described in member TBSINFO.
- SAVRSTSPLF is described in member TSRINFO.
- TRNAFP is described in member TWPINFO.
- TSPLPRD is described in member TSPLPRDI.
- TSPRWPR is described in member TSPRWPRI.
- TSPUIML is described in member TSPUIMLI.
File QATTINFO also contains information about how to use QUSRTOOL.
[ Back to top | Print APIs | APIs by category ]