The sample programs SPOOLCOB and SPOOLPLI use calls to the MVSSPLPB API to retrieve data from the SPLJOB, SPLMSG and SPLDSN files, and write the returned data to an output file, in a report format.
The source files (SPOOLCOB.cbl and SPOOLPLI.pli) are located in the src sub-directory of your product installation directory.