The List Spooled Files (QUSLSPL) API is similar to the Work with Spooled Files (WRKSPLF) and the Work with Job (WRKJOB OPTION(*SPLF)) commands. QUSLSPL generates a list of spooled files into a user space. You can filter the spool files by users, output queues, form types, user-specified data values, job, or stored in an auxiliary storage pool. There are several utilities that show how to use QUSLSPL in various RPG, Cobol, and C:
RPG IV service program SplLst, by Julian Monnypenny
"Listing Spool File Entries - Simplified!"
(You must be an iSeries Network professional member to access this article.)
http://www.iseriesnetwork.com/features/newmf/Article.cfm?ArticleID=3011
RPG IV service program LSTSPLF, by Thomas Raddatz
http://www.tools400.de/English/Freeware/Service_Programs/service_programs.html
RPG IV program LSTSPLF, by Craig Rutledge
http://www.alltel.net/~craigru/jcrdown2.html#JCRSPLF_tag
CMD source LUSSPLF (List Spooled Files), by Tom Liotta
http://home.earthlink.net/~tliotta/Files/Age_Spool_Files/Age_Spool_Files_README.htm
Sample RPG ILE, RPG OPM, Cobol, and C example source code from IBM
System API Programming Manual
http://publib.boulder.ibm.com/iseries/v5r1/ic2924/books/c4158000.pdf
http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/qb3avc00/CCONTENTS
More information for the QUSLSPL is available in IBM's InfoCenter at
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/apis/QUSLSPL.htm.
Information for all printing APIs is at
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/apis/print1b.htm.
An alternative to QUSLSPL is the QGYOLSPL API. You can read about the
differences between the two APIs at
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/apis/qgyolspl.htm.