There are two APIs that you can use to access the spool control files:
MVSSPLPB API This program enables the retrieval of all data from the spool control files SPLJOB, SPLMSG, SPLDSN, SPLOUT and SPLSUB. This is the recommended API to be used for all new spool enquiries.
MVSCASPB API This program is delivered for compatibility with earlier releases of Enterprise Developer, enabling you to access a subset of job status information held in the spool control files SPLJOB, SPLMSG, and SPLDSN.